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
33c4072d
Commit
33c4072d
authored
Oct 22, 1998
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
INET/CIDR cleanup from D'Arcy.
parent
002657f7
Changes
6
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
558 additions
and
60 deletions
+558
-60
src/backend/utils/adt/Makefile
src/backend/utils/adt/Makefile
+2
-2
src/backend/utils/adt/network.c
src/backend/utils/adt/network.c
+484
-0
src/include/catalog/pg_opclass.h
src/include/catalog/pg_opclass.h
+3
-3
src/include/catalog/pg_operator.h
src/include/catalog/pg_operator.h
+21
-21
src/include/catalog/pg_proc.h
src/include/catalog/pg_proc.h
+29
-16
src/include/utils/builtins.h
src/include/utils/builtins.h
+19
-18
No files found.
src/backend/utils/adt/Makefile
View file @
33c4072d
...
...
@@ -4,7 +4,7 @@
# Makefile for utils/adt
#
# IDENTIFICATION
# $Header: /cvsroot/pgsql/src/backend/utils/adt/Makefile,v 1.
19 1998/10/08 00:19:33
momjian Exp $
# $Header: /cvsroot/pgsql/src/backend/utils/adt/Makefile,v 1.
20 1998/10/22 20:40:44
momjian Exp $
#
#-------------------------------------------------------------------------
...
...
@@ -24,7 +24,7 @@ OBJS = acl.o arrayfuncs.o arrayutils.o bool.o cash.o char.o chunk.o \
oid.o oracle_compat.o
\
regexp.o regproc.o ruleutils.o selfuncs.o sets.o
\
tid.o timestamp.o varchar.o varlena.o version.o
\
inet
.o mac.o inet_net_ntop.o inet_net_pton.o
network
.o mac.o inet_net_ntop.o inet_net_pton.o
all
:
SUBSYS.o
...
...
src/backend/utils/adt/network.c
0 → 100644
View file @
33c4072d
This diff is collapsed.
Click to expand it.
src/include/catalog/pg_opclass.h
View file @
33c4072d
...
...
@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: pg_opclass.h,v 1.1
4 1998/10/21 16:06
:46 momjian Exp $
* $Id: pg_opclass.h,v 1.1
5 1998/10/22 20:40
:46 momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
...
...
@@ -109,9 +109,9 @@ DATA(insert OID = 1313 ( timespan_ops 1186 ));
DESCR
(
""
);
DATA
(
insert
OID
=
810
(
macaddr_ops
829
));
DESCR
(
""
);
DATA
(
insert
OID
=
935
(
inet
_ops
869
));
DATA
(
insert
OID
=
935
(
network
_ops
869
));
DESCR
(
""
);
DATA
(
insert
OID
=
652
(
inet
_ops
650
));
DATA
(
insert
OID
=
652
(
network
_ops
650
));
DESCR
(
""
);
#endif
/* PG_OPCLASS_H */
src/include/catalog/pg_operator.h
View file @
33c4072d
...
...
@@ -7,7 +7,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: pg_operator.h,v 1.4
2 1998/10/22 13:51:00
momjian Exp $
* $Id: pg_operator.h,v 1.4
3 1998/10/22 20:40:47
momjian Exp $
*
* NOTES
* the genbki.sh script reads this file and generates .bki
...
...
@@ -644,28 +644,28 @@ DATA(insert OID = 1224 ( ">" PGUID 0 b t f 829 829 16 1222 1223 0 0 macaddr
DATA
(
insert
OID
=
1225
(
">="
PGUID
0
b
t
f
829
829
16
1223
1222
0
0
macaddr_ge
intltsel
intltjoinsel
));
/* INET type */
DATA
(
insert
OID
=
1201
(
"="
PGUID
0
b
t
t
869
869
16
1201
1202
0
0
inet
_eq
eqsel
eqjoinsel
));
DATA
(
insert
OID
=
1202
(
"<>"
PGUID
0
b
t
f
869
869
16
1202
1201
0
0
inet
_ne
neqsel
neqjoinsel
));
DATA
(
insert
OID
=
1203
(
"<"
PGUID
0
b
t
f
869
869
16
1205
1206
0
0
inet
_lt
intltsel
intltjoinsel
));
DATA
(
insert
OID
=
1204
(
"<="
PGUID
0
b
t
f
869
869
16
1206
1205
0
0
inet
_le
intltsel
intltjoinsel
));
DATA
(
insert
OID
=
1205
(
">"
PGUID
0
b
t
f
869
869
16
1203
1204
0
0
inet
_gt
intltsel
intltjoinsel
));
DATA
(
insert
OID
=
1206
(
">="
PGUID
0
b
t
f
869
869
16
1204
1203
0
0
inet
_ge
intltsel
intltjoinsel
));
DATA
(
insert
OID
=
931
(
"<<"
PGUID
0
b
t
f
869
869
16
933
934
0
0
inet
_sub
intltsel
intltjoinsel
));
DATA
(
insert
OID
=
932
(
"<<="
PGUID
0
b
t
f
869
869
16
934
933
0
0
inet
_subeq
intltsel
intltjoinsel
));
DATA
(
insert
OID
=
933
(
">>"
PGUID
0
b
t
f
869
869
16
931
932
0
0
inet
_sup
intltsel
intltjoinsel
));
DATA
(
insert
OID
=
934
(
">>="
PGUID
0
b
t
f
869
869
16
932
931
0
0
inet
_supeq
intltsel
intltjoinsel
));
DATA
(
insert
OID
=
1201
(
"="
PGUID
0
b
t
t
869
869
16
1201
1202
0
0
network
_eq
eqsel
eqjoinsel
));
DATA
(
insert
OID
=
1202
(
"<>"
PGUID
0
b
t
f
869
869
16
1202
1201
0
0
network
_ne
neqsel
neqjoinsel
));
DATA
(
insert
OID
=
1203
(
"<"
PGUID
0
b
t
f
869
869
16
1205
1206
0
0
network
_lt
intltsel
intltjoinsel
));
DATA
(
insert
OID
=
1204
(
"<="
PGUID
0
b
t
f
869
869
16
1206
1205
0
0
network
_le
intltsel
intltjoinsel
));
DATA
(
insert
OID
=
1205
(
">"
PGUID
0
b
t
f
869
869
16
1203
1204
0
0
network
_gt
intltsel
intltjoinsel
));
DATA
(
insert
OID
=
1206
(
">="
PGUID
0
b
t
f
869
869
16
1204
1203
0
0
network
_ge
intltsel
intltjoinsel
));
DATA
(
insert
OID
=
931
(
"<<"
PGUID
0
b
t
f
869
869
16
933
934
0
0
network
_sub
intltsel
intltjoinsel
));
DATA
(
insert
OID
=
932
(
"<<="
PGUID
0
b
t
f
869
869
16
934
933
0
0
network
_subeq
intltsel
intltjoinsel
));
DATA
(
insert
OID
=
933
(
">>"
PGUID
0
b
t
f
869
869
16
931
932
0
0
network
_sup
intltsel
intltjoinsel
));
DATA
(
insert
OID
=
934
(
">>="
PGUID
0
b
t
f
869
869
16
932
931
0
0
network
_supeq
intltsel
intltjoinsel
));
/* CIDR type */
DATA
(
insert
OID
=
820
(
"="
PGUID
0
b
t
t
650
650
16
820
821
0
0
inet
_eq
eqsel
eqjoinsel
));
DATA
(
insert
OID
=
821
(
"<>"
PGUID
0
b
t
f
650
650
16
821
820
0
0
inet
_ne
neqsel
neqjoinsel
));
DATA
(
insert
OID
=
822
(
"<"
PGUID
0
b
t
f
650
650
16
824
825
0
0
inet
_lt
intltsel
intltjoinsel
));
DATA
(
insert
OID
=
823
(
"<="
PGUID
0
b
t
f
650
650
16
825
824
0
0
inet
_le
intltsel
intltjoinsel
));
DATA
(
insert
OID
=
824
(
">"
PGUID
0
b
t
f
650
650
16
822
823
0
0
inet
_gt
intltsel
intltjoinsel
));
DATA
(
insert
OID
=
825
(
">="
PGUID
0
b
t
f
650
650
16
823
822
0
0
inet
_ge
intltsel
intltjoinsel
));
DATA
(
insert
OID
=
826
(
"<<"
PGUID
0
b
t
f
650
650
16
828
1004
0
0
inet
_sub
intltsel
intltjoinsel
));
DATA
(
insert
OID
=
827
(
"<<="
PGUID
0
b
t
f
650
650
16
1004
828
0
0
inet
_subeq
intltsel
intltjoinsel
));
DATA
(
insert
OID
=
828
(
">>"
PGUID
0
b
t
f
650
650
16
826
827
0
0
inet
_sup
intltsel
intltjoinsel
));
DATA
(
insert
OID
=
1004
(
">>="
PGUID
0
b
t
f
650
650
16
827
826
0
0
inet
_supeq
intltsel
intltjoinsel
));
DATA
(
insert
OID
=
820
(
"="
PGUID
0
b
t
t
650
650
16
820
821
0
0
network
_eq
eqsel
eqjoinsel
));
DATA
(
insert
OID
=
821
(
"<>"
PGUID
0
b
t
f
650
650
16
821
820
0
0
network
_ne
neqsel
neqjoinsel
));
DATA
(
insert
OID
=
822
(
"<"
PGUID
0
b
t
f
650
650
16
824
825
0
0
network
_lt
intltsel
intltjoinsel
));
DATA
(
insert
OID
=
823
(
"<="
PGUID
0
b
t
f
650
650
16
825
824
0
0
network
_le
intltsel
intltjoinsel
));
DATA
(
insert
OID
=
824
(
">"
PGUID
0
b
t
f
650
650
16
822
823
0
0
network
_gt
intltsel
intltjoinsel
));
DATA
(
insert
OID
=
825
(
">="
PGUID
0
b
t
f
650
650
16
823
822
0
0
network
_ge
intltsel
intltjoinsel
));
DATA
(
insert
OID
=
826
(
"<<"
PGUID
0
b
t
f
650
650
16
828
1004
0
0
network
_sub
intltsel
intltjoinsel
));
DATA
(
insert
OID
=
827
(
"<<="
PGUID
0
b
t
f
650
650
16
1004
828
0
0
network
_subeq
intltsel
intltjoinsel
));
DATA
(
insert
OID
=
828
(
">>"
PGUID
0
b
t
f
650
650
16
826
827
0
0
network
_sup
intltsel
intltjoinsel
));
DATA
(
insert
OID
=
1004
(
">>="
PGUID
0
b
t
f
650
650
16
827
826
0
0
network
_supeq
intltsel
intltjoinsel
));
/*
* function prototypes
...
...
src/include/catalog/pg_proc.h
View file @
33c4072d
...
...
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: pg_proc.h,v 1.8
0 1998/10/22 13:51:02
momjian Exp $
* $Id: pg_proc.h,v 1.8
1 1998/10/22 20:40:49
momjian Exp $
*
* NOTES
* The script catalog/genbki.sh reads this file and generates .bki
...
...
@@ -2081,39 +2081,52 @@ DATA(insert OID = 1416 ( cidr_out PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo
DESCR
(
"(internal)"
);
/* these are used for both inet and cidr */
DATA
(
insert
OID
=
920
(
inet
_eq
PGUID
11
f
t
f
2
f
16
"869 869"
100
0
0
100
foo
bar
));
DATA
(
insert
OID
=
920
(
network
_eq
PGUID
11
f
t
f
2
f
16
"869 869"
100
0
0
100
foo
bar
));
DESCR
(
"equal"
);
DATA
(
insert
OID
=
921
(
inet
_lt
PGUID
11
f
t
f
2
f
16
"869 869"
100
0
0
100
foo
bar
));
DATA
(
insert
OID
=
921
(
network
_lt
PGUID
11
f
t
f
2
f
16
"869 869"
100
0
0
100
foo
bar
));
DESCR
(
"less-than"
);
DATA
(
insert
OID
=
922
(
inet
_le
PGUID
11
f
t
f
2
f
16
"869 869"
100
0
0
100
foo
bar
));
DATA
(
insert
OID
=
922
(
network
_le
PGUID
11
f
t
f
2
f
16
"869 869"
100
0
0
100
foo
bar
));
DESCR
(
"less-than-or-equal"
);
DATA
(
insert
OID
=
923
(
inet
_gt
PGUID
11
f
t
f
2
f
16
"869 869"
100
0
0
100
foo
bar
));
DATA
(
insert
OID
=
923
(
network
_gt
PGUID
11
f
t
f
2
f
16
"869 869"
100
0
0
100
foo
bar
));
DESCR
(
"greater-than"
);
DATA
(
insert
OID
=
924
(
inet
_ge
PGUID
11
f
t
f
2
f
16
"869 869"
100
0
0
100
foo
bar
));
DATA
(
insert
OID
=
924
(
network
_ge
PGUID
11
f
t
f
2
f
16
"869 869"
100
0
0
100
foo
bar
));
DESCR
(
"greater-than-or-equal"
);
DATA
(
insert
OID
=
925
(
inet
_ne
PGUID
11
f
t
f
2
f
16
"869 869"
100
0
0
100
foo
bar
));
DATA
(
insert
OID
=
925
(
network
_ne
PGUID
11
f
t
f
2
f
16
"869 869"
100
0
0
100
foo
bar
));
DESCR
(
"not equal"
);
DATA
(
insert
OID
=
926
(
inet
_cmp
PGUID
11
f
t
f
2
f
23
"869 869"
100
0
0
100
foo
bar
));
DATA
(
insert
OID
=
926
(
network
_cmp
PGUID
11
f
t
f
2
f
23
"869 869"
100
0
0
100
foo
bar
));
DESCR
(
"less-equal-greater"
);
DATA
(
insert
OID
=
927
(
inet
_sub
PGUID
11
f
t
f
2
f
16
"869 869"
100
0
0
100
foo
bar
));
DATA
(
insert
OID
=
927
(
network
_sub
PGUID
11
f
t
f
2
f
16
"869 869"
100
0
0
100
foo
bar
));
DESCR
(
"is-subnet"
);
DATA
(
insert
OID
=
928
(
inet
_subeq
PGUID
11
f
t
f
2
f
16
"869 869"
100
0
0
100
foo
bar
));
DATA
(
insert
OID
=
928
(
network
_subeq
PGUID
11
f
t
f
2
f
16
"869 869"
100
0
0
100
foo
bar
));
DESCR
(
"is-subnet-or-equal"
);
DATA
(
insert
OID
=
929
(
inet
_sup
PGUID
11
f
t
f
2
f
16
"869 869"
100
0
0
100
foo
bar
));
DATA
(
insert
OID
=
929
(
network
_sup
PGUID
11
f
t
f
2
f
16
"869 869"
100
0
0
100
foo
bar
));
DESCR
(
"is-supernet"
);
DATA
(
insert
OID
=
930
(
inet
_supeq
PGUID
11
f
t
f
2
f
16
"869 869"
100
0
0
100
foo
bar
));
DATA
(
insert
OID
=
930
(
network
_supeq
PGUID
11
f
t
f
2
f
16
"869 869"
100
0
0
100
foo
bar
));
DESCR
(
"is-supernet-or-equal"
);
/* inet/cidr versions */
DATA
(
insert
OID
=
940
(
net
mask
PGUID
11
f
t
f
1
f
25
"869"
100
0
0
100
foo
bar
));
DATA
(
insert
OID
=
940
(
net
work_netmask
PGUID
11
f
t
f
1
f
25
"869"
100
0
0
100
foo
bar
));
DESCR
(
"netmask of address"
);
DATA
(
insert
OID
=
941
(
masklen
PGUID
11
f
t
f
1
f
23
"869"
100
0
0
100
foo
bar
));
DATA
(
insert
OID
=
941
(
network_masklen
PGUID
11
f
t
f
1
f
23
"869"
100
0
0
100
foo
bar
));
DESCR
(
"netmask length"
);
DATA
(
insert
OID
=
945
(
broadcast
PGUID
11
f
t
f
1
f
25
"869"
100
0
0
100
foo
bar
));
DATA
(
insert
OID
=
945
(
network_broadcast
PGUID
11
f
t
f
1
f
25
"869"
100
0
0
100
foo
bar
));
DESCR
(
"broadcast address"
);
DATA
(
insert
OID
=
682
(
host
PGUID
11
f
t
f
1
f
25
"869"
100
0
0
100
foo
bar
));
DATA
(
insert
OID
=
682
(
network_host
PGUID
11
f
t
f
1
f
25
"869"
100
0
0
100
foo
bar
));
DESCR
(
"host address"
);
DATA
(
insert
OID
=
473
(
network_network
PGUID
11
f
t
f
1
f
25
"869"
100
0
0
100
foo
bar
));
DESCR
(
"network address"
);
/* shortcut names */
DATA
(
insert
OID
=
696
(
netmask
PGUID
14
f
t
f
1
f
25
"869"
100
0
0
100
"select network_netmask($1)"
-
));
DESCR
(
"netmask of address"
);
DATA
(
insert
OID
=
697
(
masklen
PGUID
14
f
t
f
1
f
23
"869"
100
0
0
100
"select network_masklen($1)"
-
));
DESCR
(
"netmask length"
);
DATA
(
insert
OID
=
698
(
broadcast
PGUID
14
f
t
f
1
f
25
"869"
100
0
0
100
"select network_broadcast($1)"
-
));
DESCR
(
"broadcast address"
);
DATA
(
insert
OID
=
699
(
host
PGUID
14
f
t
f
1
f
25
"869"
100
0
0
100
"select network_host($1)"
-
));
DESCR
(
"host address"
);
DATA
(
insert
OID
=
683
(
network
PGUID
14
f
t
f
1
f
25
"869"
100
0
0
100
"select network_network($1)"
-
));
DESCR
(
"network address"
);
/*
* prototypes for functions pg_proc.c
...
...
src/include/utils/builtins.h
View file @
33c4072d
...
...
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: builtins.h,v 1.6
7 1998/10/22 13:51:07
momjian Exp $
* $Id: builtins.h,v 1.6
8 1998/10/22 20:40:50
momjian Exp $
*
* NOTES
* This should normally only be included by fmgr.h.
...
...
@@ -516,27 +516,28 @@ char *inet_cidr_ntop(int af, const void *src, int bits, char *dst, size_t size);
/* inet_net_pton.c */
int
inet_net_pton
(
int
af
,
const
char
*
src
,
void
*
dst
,
size_t
size
);
/*
inet
.c */
/*
network
.c */
inet
*
inet_in
(
char
*
str
);
char
*
inet_out
(
inet
*
addr
);
inet
*
cidr_in
(
char
*
str
);
char
*
cidr_out
(
inet
*
addr
);
bool
inet_lt
(
inet
*
a1
,
inet
*
a2
);
bool
inet_le
(
inet
*
a1
,
inet
*
a2
);
bool
inet_eq
(
inet
*
a1
,
inet
*
a2
);
bool
inet_ge
(
inet
*
a1
,
inet
*
a2
);
bool
inet_gt
(
inet
*
a1
,
inet
*
a2
);
bool
inet_ne
(
inet
*
a1
,
inet
*
a2
);
bool
inet_sub
(
inet
*
a1
,
inet
*
a2
);
bool
inet_subeq
(
inet
*
a1
,
inet
*
a2
);
bool
inet_sup
(
inet
*
a1
,
inet
*
a2
);
bool
inet_supeq
(
inet
*
a1
,
inet
*
a2
);
int4
inet_cmp
(
inet
*
a1
,
inet
*
a2
);
text
*
netmask
(
inet
*
addr
);
int4
masklen
(
inet
*
addr
);
text
*
broadcast
(
inet
*
addr
);
text
*
host
(
inet
*
addr
);
bool
network_lt
(
inet
*
a1
,
inet
*
a2
);
bool
network_le
(
inet
*
a1
,
inet
*
a2
);
bool
network_eq
(
inet
*
a1
,
inet
*
a2
);
bool
network_ge
(
inet
*
a1
,
inet
*
a2
);
bool
network_gt
(
inet
*
a1
,
inet
*
a2
);
bool
network_ne
(
inet
*
a1
,
inet
*
a2
);
bool
network_sub
(
inet
*
a1
,
inet
*
a2
);
bool
network_subeq
(
inet
*
a1
,
inet
*
a2
);
bool
network_sup
(
inet
*
a1
,
inet
*
a2
);
bool
network_supeq
(
inet
*
a1
,
inet
*
a2
);
int4
network_cmp
(
inet
*
a1
,
inet
*
a2
);
text
*
network_network
(
inet
*
addr
);
text
*
network_netmask
(
inet
*
addr
);
int4
network_masklen
(
inet
*
addr
);
text
*
network_broadcast
(
inet
*
addr
);
text
*
network_host
(
inet
*
addr
);
/* mac.c */
macaddr
*
macaddr_in
(
char
*
str
);
...
...
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