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

Commit2ba4ee7

Browse files
committed
Fix function calls to INET/CIDR functions. Added cidr_out.
1 parentf9ee084 commit2ba4ee7

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+
returninet_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(insertOID=1267 (cidr_inPGUID11ftf1f650"0"10000100foobar ));
20792079
DESCR("(internal)");
2080+
DATA(insertOID=1416 (cidr_outPGUID11ftf1f23"0"10000100foobar ));
2081+
DESCR("(internal)");
20802082

20812083
/* these are used for both inet and cidr */
20822084
DATA(insertOID=920 (inet_eqPGUID11ftf2f16"869 869"10000100foobar ));
@@ -2113,23 +2115,23 @@ DATA(insert OID = 682 ( inet_hostPGUID 11 f t f 1 f 25 "869" 100 0 0 100 fo
21132115
DESCR("host address");
21142116

21152117
/* inet versions */
2116-
DATA(insertOID=940 (netmaskPGUID14ftf1f25"869"10000100"select inet_netmask($1)"- ));
2118+
DATA(insertOID=946 (netmaskPGUID14ftf1f25"869"10000100"select inet_netmask($1)"- ));
21172119
DESCR("netmask of address");
2118-
DATA(insertOID=941 (netmasklenPGUID14ftf1f23"869"10000100"select inet_netmasklen($1)"- ));
2120+
DATA(insertOID=947 (netmasklenPGUID14ftf1f23"869"10000100"select inet_netmasklen($1)"- ));
21192121
DESCR("netmask length");
2120-
DATA(insertOID=945 (broadcastPGUID14ftf1f25"869"10000100"select inet_broadcast($1)"- ));
2122+
DATA(insertOID=948 (broadcastPGUID14ftf1f25"869"10000100"select inet_broadcast($1)"- ));
21212123
DESCR("broadcast address");
2122-
DATA(insertOID=682 (hostPGUID14ftf1f25"869"10000100"select inet_host($1)"- ));
2124+
DATA(insertOID=949 (hostPGUID14ftf1f25"869"10000100"select inet_host($1)"- ));
21232125
DESCR("host address");
21242126

21252127
/* cidr versions */
2126-
DATA(insertOID=940 (netmaskPGUID14ftf1f25"650"10000100"select inet_netmask($1)"- ));
2128+
DATA(insertOID=696 (netmaskPGUID14ftf1f25"650"10000100"select inet_netmask($1)"- ));
21272129
DESCR("netmask of address");
2128-
DATA(insertOID=941 (netmasklenPGUID14ftf1f23"650"10000100"select inet_netmasklen($1)"- ));
2130+
DATA(insertOID=697 (netmasklenPGUID14ftf1f23"650"10000100"select inet_netmasklen($1)"- ));
21292131
DESCR("netmask length");
2130-
DATA(insertOID=945 (broadcastPGUID14ftf1f25"650"10000100"select inet_broadcast($1)"- ));
2132+
DATA(insertOID=698 (broadcastPGUID14ftf1f25"650"10000100"select inet_broadcast($1)"- ));
21312133
DESCR("broadcast address");
2132-
DATA(insertOID=682 (hostPGUID14ftf1f25"650"10000100"select inet_host($1)"- ));
2134+
DATA(insertOID=699 (hostPGUID14ftf1f25"650"10000100"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 00 macaddr_in macaddr
302302
DESCR("MAC address");
303303
DATA(insertOID=869 (inetPGUID-1-1fbt \05400inet_ininet_outinet_ininet_outi_null_ ));
304304
DESCR("Host address");
305-
DATA(insertOID=650 (cidrPGUID-1-1fbt \05400cidr_ininet_outcidr_ininet_outi_null_ ));
305+
DATA(insertOID=650 (cidrPGUID-1-1fbt \05400cidr_incidr_outcidr_incidr_outi_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)

[8]ページ先頭

©2009-2025 Movatter.jp