Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 2ba4ee7

Browse files
committed
Fix function calls to INET/CIDR functions. Added cidr_out.
1 parent f9ee084 commit 2ba4ee7

File tree

4 files changed

+23
-13
lines changed

4 files changed

+23
-13
lines changed

src/backend/utils/adt/inet.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* is for IP V4 CIDR notation, but prepared for V6: just
44
* add the necessary bits where the comments indicate.
55
*
6-
* $Id: inet.c,v 1.9 1998/10/21 16:06:45 momjian Exp $
6+
* $Id: inet.c,v 1.10 1998/10/22 00:35:23 momjian Exp $
77
* Jon Postel RIP 16 Oct 1998
88
*/
99

@@ -148,6 +148,13 @@ cidr_in(char *src)
148148
return (dst);
149149
}
150150

151+
/* just a stub */
152+
char *
153+
cidr_out(inet *src)
154+
{
155+
return inet_out(src);
156+
}
157+
151158
/*
152159
* Boolean tests for magnitude. Add V4/V6 testing!
153160
*/

src/include/catalog/pg_proc.h

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Id: pg_proc.h,v 1.76 1998/10/21 21:14:20 momjian Exp $
9+
* $Id: pg_proc.h,v 1.77 1998/10/22 00:35:25 momjian Exp $
1010
*
1111
* NOTES
1212
* The script catalog/genbki.sh reads this file and generates .bki
@@ -2077,6 +2077,8 @@ DESCR("(internal)");
20772077
/* for cidr type support */
20782078
DATA(insert OID = 1267 ( cidr_in PGUID 11 f t f 1 f 650 "0" 100 0 0 100 foo bar ));
20792079
DESCR("(internal)");
2080+
DATA(insert OID = 1416 ( cidr_out PGUID 11 f t f 1 f 23 "0" 100 0 0 100 foo bar ));
2081+
DESCR("(internal)");
20802082

20812083
/* these are used for both inet and cidr */
20822084
DATA(insert OID = 920 ( inet_eq PGUID 11 f t f 2 f 16 "869 869" 100 0 0 100 foo bar ));
@@ -2113,23 +2115,23 @@ DATA(insert OID = 682 ( inet_host PGUID 11 f t f 1 f 25 "869" 100 0 0 100 fo
21132115
DESCR("host address");
21142116

21152117
/* inet versions */
2116-
DATA(insert OID = 940 ( netmask PGUID 14 f t f 1 f 25 "869" 100 0 0 100 "select inet_netmask($1)" - ));
2118+
DATA(insert OID = 946 ( netmask PGUID 14 f t f 1 f 25 "869" 100 0 0 100 "select inet_netmask($1)" - ));
21172119
DESCR("netmask of address");
2118-
DATA(insert OID = 941 ( netmasklen PGUID 14 f t f 1 f 23 "869" 100 0 0 100 "select inet_netmasklen($1)" - ));
2120+
DATA(insert OID = 947 ( netmasklen PGUID 14 f t f 1 f 23 "869" 100 0 0 100 "select inet_netmasklen($1)" - ));
21192121
DESCR("netmask length");
2120-
DATA(insert OID = 945 ( broadcast PGUID 14 f t f 1 f 25 "869" 100 0 0 100 "select inet_broadcast($1)" - ));
2122+
DATA(insert OID = 948 ( broadcast PGUID 14 f t f 1 f 25 "869" 100 0 0 100 "select inet_broadcast($1)" - ));
21212123
DESCR("broadcast address");
2122-
DATA(insert OID = 682 ( host PGUID 14 f t f 1 f 25 "869" 100 0 0 100 "select inet_host($1)" - ));
2124+
DATA(insert OID = 949 ( host PGUID 14 f t f 1 f 25 "869" 100 0 0 100 "select inet_host($1)" - ));
21232125
DESCR("host address");
21242126

21252127
/* cidr versions */
2126-
DATA(insert OID = 940 ( netmask PGUID 14 f t f 1 f 25 "650" 100 0 0 100 "select inet_netmask($1)" - ));
2128+
DATA(insert OID = 696 ( netmask PGUID 14 f t f 1 f 25 "650" 100 0 0 100 "select inet_netmask($1)" - ));
21272129
DESCR("netmask of address");
2128-
DATA(insert OID = 941 ( netmasklen PGUID 14 f t f 1 f 23 "650" 100 0 0 100 "select inet_netmasklen($1)" - ));
2130+
DATA(insert OID = 697 ( netmasklen PGUID 14 f t f 1 f 23 "650" 100 0 0 100 "select inet_netmasklen($1)" - ));
21292131
DESCR("netmask length");
2130-
DATA(insert OID = 945 ( broadcast PGUID 14 f t f 1 f 25 "650" 100 0 0 100 "select inet_broadcast($1)" - ));
2132+
DATA(insert OID = 698 ( broadcast PGUID 14 f t f 1 f 25 "650" 100 0 0 100 "select inet_broadcast($1)" - ));
21312133
DESCR("broadcast address");
2132-
DATA(insert OID = 682 ( host PGUID 14 f t f 1 f 25 "650" 100 0 0 100 "select inet_host($1)" - ));
2134+
DATA(insert OID = 699 ( host PGUID 14 f t f 1 f 25 "650" 100 0 0 100 "select inet_host($1)" - ));
21332135
DESCR("host address");
21342136

21352137

src/include/catalog/pg_type.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* Copyright (c) 1994, Regents of the University of California
99
*
10-
* $Id: pg_type.h,v 1.50 1998/10/21 16:06:48 momjian Exp $
10+
* $Id: pg_type.h,v 1.51 1998/10/22 00:35:26 momjian Exp $
1111
*
1212
* NOTES
1313
* the genbki.sh script reads this file and generates .bki
@@ -302,7 +302,7 @@ DATA(insert OID = 829 ( macaddr PGUID 6 -1 f b t \054 0 0 macaddr_in macaddr
302302
DESCR("MAC address");
303303
DATA(insert OID = 869 ( inet PGUID -1 -1 f b t \054 0 0 inet_in inet_out inet_in inet_out i _null_ ));
304304
DESCR("Host address");
305-
DATA(insert OID = 650 ( cidr PGUID -1 -1 f b t \054 0 0 cidr_in inet_out cidr_in inet_out i _null_ ));
305+
DATA(insert OID = 650 ( cidr PGUID -1 -1 f b t \054 0 0 cidr_in cidr_out cidr_in cidr_out i _null_ ));
306306
DESCR("Network address");
307307

308308
/* OIDS 900 - 999 */

src/include/utils/builtins.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*
77
* Copyright (c) 1994, Regents of the University of California
88
*
9-
* $Id: builtins.h,v 1.63 1998/10/21 16:06:49 momjian Exp $
9+
* $Id: builtins.h,v 1.64 1998/10/22 00:35:28 momjian Exp $
1010
*
1111
* NOTES
1212
* This should normally only be included by fmgr.h.
@@ -520,6 +520,7 @@ int inet_cidr_pton(int af, const void *src, void *dst, size_t size, int *used);
520520

521521
/* cidr.c */
522522
inet *cidr_in(char *str);
523+
char *cidr_out(inet *addr);
523524

524525
/* inet.c */
525526
inet *inet_in(char *str);

0 commit comments

Comments
 (0)