Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
ecbd8daa
Commit
ecbd8daa
authored
Jan 15, 2003
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add ORDER BY for inet regression, pointed out by Rod Taylor.
parent
2160c917
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
14 deletions
+14
-14
src/test/regress/expected/inet.out
src/test/regress/expected/inet.out
+7
-7
src/test/regress/sql/inet.sql
src/test/regress/sql/inet.sql
+7
-7
No files found.
src/test/regress/expected/inet.out
View file @
ecbd8daa
...
@@ -168,7 +168,7 @@ SELECT '' AS ten, i, c,
...
@@ -168,7 +168,7 @@ SELECT '' AS ten, i, c,
(14 rows)
(14 rows)
-- check the conversion to/from text and set_netmask
-- 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
ten | set_masklen
-----+------------------
-----+------------------
| 192.168.1.226/24
| 192.168.1.226/24
...
@@ -188,9 +188,9 @@ select '' AS ten, set_masklen(inet(text(i)), 24) FROM INET_TBL;
...
@@ -188,9 +188,9 @@ select '' AS ten, set_masklen(inet(text(i)), 24) FROM INET_TBL;
(14 rows)
(14 rows)
-- check that index works correctly
-- check that index works correctly
create index inet_idx1 on
inet_tbl(i);
CREATE INDEX inet_idx1 ON
inet_tbl(i);
set enable_seqscan to
off;
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 ORDER BY c,i
;
c | i
c | i
----------------+------------------
----------------+------------------
192.168.1.0/24 | 192.168.1.0/25
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;
...
@@ -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
192.168.1.0/24 | 192.168.1.226
(3 rows)
(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
c | i
----------------+------------------
----------------+------------------
192.168.1.0/24 | 192.168.1.0/24
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;
...
@@ -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
192.168.1.0/24 | 192.168.1.226
(6 rows)
(6 rows)
set enable_seqscan to
on;
SET enable_seqscan TO
on;
drop index
inet_idx1;
DROP INDEX
inet_idx1;
src/test/regress/sql/inet.sql
View file @
ecbd8daa
...
@@ -52,12 +52,12 @@ SELECT '' AS ten, i, c,
...
@@ -52,12 +52,12 @@ SELECT '' AS ten, i, c,
FROM
INET_TBL
;
FROM
INET_TBL
;
-- check the conversion to/from text and set_netmask
-- 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
-- check that index works correctly
create
index
inet_idx1
on
inet_tbl
(
i
);
CREATE
INDEX
inet_idx1
ON
inet_tbl
(
i
);
set
enable_seqscan
to
off
;
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
ORDER
BY
c
,
i
;
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
;
set
enable_seqscan
to
on
;
SET
enable_seqscan
TO
on
;
drop
index
inet_idx1
;
DROP
INDEX
inet_idx1
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment