Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitecbd8da

Browse files
committed
Add ORDER BY for inet regression, pointed out by Rod Taylor.
1 parent2160c91 commitecbd8da

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_idx1on inet_tbl(i);
192-
set enable_seqscanto off;
193-
select *from inet_tblwhere i<<'192.168.1.0/24'::cidr;
191+
CREATE INDEX inet_idx1ON inet_tbl(i);
192+
SET enable_seqscanTO off;
193+
SELECT *FROM inet_tblWHERE 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_tblwhere i<<='192.168.1.0/24'::cidr;
201+
SELECT *FROM inet_tblWHERE 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_seqscanto on;
213-
drop index inet_idx1;
212+
SET enable_seqscanTO 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-
createindexinet_idx1on inet_tbl(i);
58-
set enable_seqscanto off;
59-
select*from inet_tblwhere i<<'192.168.1.0/24'::cidr;
60-
select*from inet_tblwhere i<<='192.168.1.0/24'::cidr;
61-
set enable_seqscantoon;
62-
dropindex inet_idx1;
57+
CREATEINDEXinet_idx1ON inet_tbl(i);
58+
SET enable_seqscanTO off;
59+
SELECT*FROM inet_tblWHERE i<<'192.168.1.0/24'::cidrORDER BY c,i;
60+
SELECT*FROM inet_tblWHERE i<<='192.168.1.0/24'::cidrORDER BY c,i;
61+
SET enable_seqscanTOon;
62+
DROPINDEX inet_idx1;
6363

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp