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
3fe6a77f
Commit
3fe6a77f
authored
Oct 22, 1998
by
Bruce Momjian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix for funcs on INET/CIDR.
parent
2ba4ee74
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
47 additions
and
9 deletions
+47
-9
src/backend/utils/adt/inet.c
src/backend/utils/adt/inet.c
+25
-1
src/include/catalog/pg_proc.h
src/include/catalog/pg_proc.h
+16
-7
src/include/utils/builtins.h
src/include/utils/builtins.h
+6
-1
No files found.
src/backend/utils/adt/inet.c
View file @
3fe6a77f
...
...
@@ -3,7 +3,7 @@
* is for IP V4 CIDR notation, but prepared for V6: just
* add the necessary bits where the comments indicate.
*
* $Id: inet.c,v 1.1
0 1998/10/22 00:35:23
momjian Exp $
* $Id: inet.c,v 1.1
1 1998/10/22 04:58:07
momjian Exp $
* Jon Postel RIP 16 Oct 1998
*/
...
...
@@ -355,12 +355,24 @@ inet_host(inet *ip)
return
(
ret
);
}
text
*
cidr_host
(
inet
*
ip
)
{
inet_host
(
ip
);
}
int4
inet_netmasklen
(
inet
*
ip
)
{
return
ip_bits
(
ip
);
}
int4
cidr_netmasklen
(
inet
*
ip
)
{
return
inet_netmasklen
(
ip
);
}
text
*
inet_broadcast
(
inet
*
ip
)
{
...
...
@@ -402,6 +414,12 @@ inet_broadcast(inet *ip)
return
(
ret
);
}
text
*
cidr_broadcast
(
inet
*
ip
)
{
inet_broadcast
(
ip
);
}
text
*
inet_netmask
(
inet
*
ip
)
{
...
...
@@ -441,6 +459,12 @@ inet_netmask(inet *ip)
return
(
ret
);
}
text
*
cidr_netmask
(
inet
*
ip
)
{
inet_netmask
(
ip
);
}
/*
* Bitwise comparison for V4 addresses. Add V6 implementation!
*/
...
...
src/include/catalog/pg_proc.h
View file @
3fe6a77f
...
...
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: pg_proc.h,v 1.7
7 1998/10/22 00:35:25
momjian Exp $
* $Id: pg_proc.h,v 1.7
8 1998/10/22 04:58:09
momjian Exp $
*
* NOTES
* The script catalog/genbki.sh reads this file and generates .bki
...
...
@@ -2104,7 +2104,7 @@ 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
));
DESCR
(
"is-supernet-or-equal"
);
/* inet
/cidr
base versions */
/* inet base versions */
DATA
(
insert
OID
=
940
(
inet_netmask
PGUID
11
f
t
f
1
f
25
"869"
100
0
0
100
foo
bar
));
DESCR
(
"netmask of address"
);
DATA
(
insert
OID
=
941
(
inet_netmasklen
PGUID
11
f
t
f
1
f
23
"869"
100
0
0
100
foo
bar
));
...
...
@@ -2114,6 +2114,16 @@ DESCR("broadcast address");
DATA
(
insert
OID
=
682
(
inet_host
PGUID
11
f
t
f
1
f
25
"869"
100
0
0
100
foo
bar
));
DESCR
(
"host address"
);
/* cidr base versions */
DATA
(
insert
OID
=
1619
(
cidr_netmask
PGUID
11
f
t
f
1
f
25
"650"
100
0
0
100
foo
bar
));
DESCR
(
"netmask of address"
);
DATA
(
insert
OID
=
1620
(
cidr_netmasklen
PGUID
11
f
t
f
1
f
23
"650"
100
0
0
100
foo
bar
));
DESCR
(
"netmask length"
);
DATA
(
insert
OID
=
1621
(
cidr_broadcast
PGUID
11
f
t
f
1
f
25
"650"
100
0
0
100
foo
bar
));
DESCR
(
"broadcast address"
);
DATA
(
insert
OID
=
1622
(
cidr_host
PGUID
11
f
t
f
1
f
25
"650"
100
0
0
100
foo
bar
));
DESCR
(
"host address"
);
/* inet versions */
DATA
(
insert
OID
=
946
(
netmask
PGUID
14
f
t
f
1
f
25
"869"
100
0
0
100
"select inet_netmask($1)"
-
));
DESCR
(
"netmask of address"
);
...
...
@@ -2125,17 +2135,16 @@ DATA(insert OID = 949 ( host PGUID 14 f t f 1 f 25 "869" 100 0 0 100 "select
DESCR
(
"host address"
);
/* cidr versions */
DATA
(
insert
OID
=
696
(
netmask
PGUID
14
f
t
f
1
f
25
"650"
100
0
0
100
"select
inet
_netmask($1)"
-
));
DATA
(
insert
OID
=
696
(
netmask
PGUID
14
f
t
f
1
f
25
"650"
100
0
0
100
"select
cidr
_netmask($1)"
-
));
DESCR
(
"netmask of address"
);
DATA
(
insert
OID
=
697
(
netmasklen
PGUID
14
f
t
f
1
f
23
"650"
100
0
0
100
"select
inet
_netmasklen($1)"
-
));
DATA
(
insert
OID
=
697
(
netmasklen
PGUID
14
f
t
f
1
f
23
"650"
100
0
0
100
"select
cidr
_netmasklen($1)"
-
));
DESCR
(
"netmask length"
);
DATA
(
insert
OID
=
698
(
broadcast
PGUID
14
f
t
f
1
f
25
"650"
100
0
0
100
"select
inet
_broadcast($1)"
-
));
DATA
(
insert
OID
=
698
(
broadcast
PGUID
14
f
t
f
1
f
25
"650"
100
0
0
100
"select
cidr
_broadcast($1)"
-
));
DESCR
(
"broadcast address"
);
DATA
(
insert
OID
=
699
(
host
PGUID
14
f
t
f
1
f
25
"650"
100
0
0
100
"select
inet
_host($1)"
-
));
DATA
(
insert
OID
=
699
(
host
PGUID
14
f
t
f
1
f
25
"650"
100
0
0
100
"select
cidr
_host($1)"
-
));
DESCR
(
"host address"
);
/*
* prototypes for functions pg_proc.c
*/
...
...
src/include/utils/builtins.h
View file @
3fe6a77f
...
...
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: builtins.h,v 1.6
4 1998/10/22 00:35:28
momjian Exp $
* $Id: builtins.h,v 1.6
5 1998/10/22 04:58:11
momjian Exp $
*
* NOTES
* This should normally only be included by fmgr.h.
...
...
@@ -542,6 +542,11 @@ int4 inet_netmasklen(inet * addr);
text
*
inet_broadcast
(
inet
*
addr
);
text
*
inet_host
(
inet
*
addr
);
text
*
cidr_netmask
(
inet
*
addr
);
int4
cidr_netmasklen
(
inet
*
addr
);
text
*
cidr_broadcast
(
inet
*
addr
);
text
*
cidr_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