From ecbd8daaacd20b508a2f1c3631fa4e5458e570f1 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Wed, 15 Jan 2003 16:35:50 +0000 Subject: [PATCH] Add ORDER BY for inet regression, pointed out by Rod Taylor. --- src/test/regress/expected/inet.out | 14 +++++++------- src/test/regress/sql/inet.sql | 14 +++++++------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/test/regress/expected/inet.out b/src/test/regress/expected/inet.out index 0d41d582de..8c4b545687 100644 --- a/src/test/regress/expected/inet.out +++ b/src/test/regress/expected/inet.out @@ -168,7 +168,7 @@ SELECT '' AS ten, i, c, (14 rows) -- check the conversion to/from text and set_netmask -select '' AS ten, set_masklen(inet(text(i)), 24) FROM INET_TBL; +SELECT '' AS ten, set_masklen(inet(text(i)), 24) FROM INET_TBL; ten | set_masklen -----+------------------ | 192.168.1.226/24 @@ -188,9 +188,9 @@ select '' AS ten, set_masklen(inet(text(i)), 24) FROM INET_TBL; (14 rows) -- check that index works correctly -create index inet_idx1 on inet_tbl(i); -set enable_seqscan to off; -select * from inet_tbl where i<<'192.168.1.0/24'::cidr; +CREATE INDEX inet_idx1 ON inet_tbl(i); +SET enable_seqscan TO off; +SELECT * FROM inet_tbl WHERE i<<'192.168.1.0/24'::cidr ORDER BY c,i; c | i ----------------+------------------ 192.168.1.0/24 | 192.168.1.0/25 @@ -198,7 +198,7 @@ select * from inet_tbl where i<<'192.168.1.0/24'::cidr; 192.168.1.0/24 | 192.168.1.226 (3 rows) -select * from inet_tbl where i<<='192.168.1.0/24'::cidr; +SELECT * FROM inet_tbl WHERE i<<='192.168.1.0/24'::cidr ORDER BY c,i; c | i ----------------+------------------ 192.168.1.0/24 | 192.168.1.0/24 @@ -209,5 +209,5 @@ select * from inet_tbl where i<<='192.168.1.0/24'::cidr; 192.168.1.0/24 | 192.168.1.226 (6 rows) -set enable_seqscan to on; -drop index inet_idx1; +SET enable_seqscan TO on; +DROP INDEX inet_idx1; diff --git a/src/test/regress/sql/inet.sql b/src/test/regress/sql/inet.sql index 5cdf688ed8..ca11f49495 100644 --- a/src/test/regress/sql/inet.sql +++ b/src/test/regress/sql/inet.sql @@ -52,12 +52,12 @@ SELECT '' AS ten, i, c, FROM INET_TBL; -- check the conversion to/from text and set_netmask -select '' AS ten, set_masklen(inet(text(i)), 24) FROM INET_TBL; +SELECT '' AS ten, set_masklen(inet(text(i)), 24) FROM INET_TBL; -- check that index works correctly -create index inet_idx1 on inet_tbl(i); -set enable_seqscan to off; -select * from inet_tbl where i<<'192.168.1.0/24'::cidr; -select * from inet_tbl where i<<='192.168.1.0/24'::cidr; -set enable_seqscan to on; -drop index inet_idx1; +CREATE INDEX inet_idx1 ON inet_tbl(i); +SET enable_seqscan TO off; +SELECT * FROM inet_tbl WHERE i<<'192.168.1.0/24'::cidr ORDER BY c,i; +SELECT * FROM inet_tbl WHERE i<<='192.168.1.0/24'::cidr ORDER BY c,i; +SET enable_seqscan TO on; +DROP INDEX inet_idx1;