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

Commit485a71a

Browse files
author
Thomas G. Lockhart
committed
Add tests for comparison operators.
1 parentd9a2be0 commit485a71a

File tree

1 file changed

+20
-11
lines changed

1 file changed

+20
-11
lines changed

‎src/test/regress/sql/inet.sql

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,23 +13,32 @@ INSERT INTO INET_TBL (c, i) VALUES ('10.1.2.3', '10.1.2.3/32');
1313
INSERT INTO INET_TBL (c, i)VALUES ('10.1.2','10.1.2.3/24');
1414
INSERT INTO INET_TBL (c, i)VALUES ('10.1','10.1.2.3/16');
1515
INSERT INTO INET_TBL (c, i)VALUES ('10','10.1.2.3/8');
16+
INSERT INTO INET_TBL (c, i)VALUES ('10','11.1.2.3/8');
17+
INSERT INTO INET_TBL (c, i)VALUES ('10','9.1.2.3/8');
1618

17-
SELECT''as eight, cascidr, iasinetFROM INET_TBL;
19+
SELECT''AS ten, cAScidr, iASinetFROM INET_TBL;
1820

1921
-- now test some support functions
2022

21-
SELECT''as eight, iasinet, host(i)FROM INET_TBL;
22-
SELECT''as eight, cascidr, broadcast(c),
23-
iasinet, broadcast(i)FROM INET_TBL;
24-
SELECT''as eight, cascidr, network(c)as"network(cidr)",
25-
iasinet, network(i)as"network(inet)"FROM INET_TBL;
26-
SELECT''as eight, cascidr, masklen(c)as"masklen(cidr)",
27-
iasinet, masklen(i)as"masklen(inet)"FROM INET_TBL;
23+
SELECT''AS ten, iASinet, host(i)FROM INET_TBL;
24+
SELECT''AS ten, cAScidr, broadcast(c),
25+
iASinet, broadcast(i)FROM INET_TBL;
26+
SELECT''AS ten, cAScidr, network(c)AS"network(cidr)",
27+
iASinet, network(i)AS"network(inet)"FROM INET_TBL;
28+
SELECT''AS ten, cAScidr, masklen(c)AS"masklen(cidr)",
29+
iASinet, masklen(i)AS"masklen(inet)"FROM INET_TBL;
2830

29-
SELECT''as two, cascidr, masklen(c)as"masklen(cidr)",
30-
iasinet, masklen(i)as"masklen(inet)"FROM INET_TBL
31+
SELECT''AS four, cAScidr, masklen(c)AS"masklen(cidr)",
32+
iASinet, masklen(i)AS"masklen(inet)"FROM INET_TBL
3133
WHERE masklen(c)<=8;
3234

33-
SELECT''as six, cascidr, iasinetFROM INET_TBL
35+
SELECT''AS six, cAScidr, iASinetFROM INET_TBL
3436
WHERE c= i;
3537

38+
SELECT''AS ten, i, c,
39+
i< cAS lt, i<= cAS le, i= cAS eq,
40+
i>= cAS ge, i> cAS gt, i<> cAS ne,
41+
i<< cAS sb, i<<= cAS sbe,
42+
i>> cAS sup, i>>= cAS spe
43+
FROM INET_TBL;
44+

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp