Skip to content

Commit ecbd8da

Browse files
committed
Add ORDER BY for inet regression, pointed out by Rod Taylor.
1 parent 2160c91 commit ecbd8da

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

src/test/regress/expected/inet.out

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ SELECT '' AS ten, i, c,
168168
(14 rows)
169169

170170
-- check the conversion to/from text and set_netmask
171-
select '' AS ten, set_masklen(inet(text(i)), 24) FROM INET_TBL;
171+
SELECT '' AS ten, set_masklen(inet(text(i)), 24) FROM INET_TBL;
172172
ten | set_masklen
173173
-----+------------------
174174
| 192.168.1.226/24
@@ -188,17 +188,17 @@ select '' AS ten, set_masklen(inet(text(i)), 24) FROM INET_TBL;
188188
(14 rows)
189189

190190
-- check that index works correctly
191-
create index inet_idx1 on inet_tbl(i);
192-
set enable_seqscan to off;
193-
select * from inet_tbl where i<<'192.168.1.0/24'::cidr;
191+
CREATE INDEX inet_idx1 ON inet_tbl(i);
192+
SET enable_seqscan TO off;
193+
SELECT * FROM inet_tbl WHERE i<<'192.168.1.0/24'::cidr ORDER BY c,i;
194194
c | i
195195
----------------+------------------
196196
192.168.1.0/24 | 192.168.1.0/25
197197
192.168.1.0/24 | 192.168.1.255/25
198198
192.168.1.0/24 | 192.168.1.226
199199
(3 rows)
200200

201-
select * from inet_tbl where i<<='192.168.1.0/24'::cidr;
201+
SELECT * FROM inet_tbl WHERE i<<='192.168.1.0/24'::cidr ORDER BY c,i;
202202
c | i
203203
----------------+------------------
204204
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;
209209
192.168.1.0/24 | 192.168.1.226
210210
(6 rows)
211211

212-
set enable_seqscan to on;
213-
drop index inet_idx1;
212+
SET enable_seqscan TO on;
213+
DROP INDEX inet_idx1;

src/test/regress/sql/inet.sql

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,12 @@ SELECT '' AS ten, i, c,
5252
FROM INET_TBL;
5353

5454
-- check the conversion to/from text and set_netmask
55-
select '' AS ten, set_masklen(inet(text(i)), 24) FROM INET_TBL;
55+
SELECT '' AS ten, set_masklen(inet(text(i)), 24) FROM INET_TBL;
5656
-- check that index works correctly
57-
create index inet_idx1 on inet_tbl(i);
58-
set enable_seqscan to off;
59-
select * from inet_tbl where i<<'192.168.1.0/24'::cidr;
60-
select * from inet_tbl where i<<='192.168.1.0/24'::cidr;
61-
set enable_seqscan to on;
62-
drop index inet_idx1;
57+
CREATE INDEX inet_idx1 ON inet_tbl(i);
58+
SET enable_seqscan TO off;
59+
SELECT * FROM inet_tbl WHERE i<<'192.168.1.0/24'::cidr ORDER BY c,i;
60+
SELECT * FROM inet_tbl WHERE i<<='192.168.1.0/24'::cidr ORDER BY c,i;
61+
SET enable_seqscan TO on;
62+
DROP INDEX inet_idx1;
6363

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy