diff options
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/catalog/pg_opclass.h | 6 | ||||
| -rw-r--r-- | src/include/catalog/pg_operator.h | 42 | ||||
| -rw-r--r-- | src/include/catalog/pg_proc.h | 45 | ||||
| -rw-r--r-- | src/include/utils/builtins.h | 37 |
4 files changed, 72 insertions, 58 deletions
diff --git a/src/include/catalog/pg_opclass.h b/src/include/catalog/pg_opclass.h index d342cd6c521..d657733ba47 100644 --- a/src/include/catalog/pg_opclass.h +++ b/src/include/catalog/pg_opclass.h @@ -7,7 +7,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: pg_opclass.h,v 1.14 1998/10/21 16:06:46 momjian Exp $ + * $Id: pg_opclass.h,v 1.15 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 */ diff --git a/src/include/catalog/pg_operator.h b/src/include/catalog/pg_operator.h index 87a8471c509..7498841c32d 100644 --- a/src/include/catalog/pg_operator.h +++ b/src/include/catalog/pg_operator.h @@ -7,7 +7,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: pg_operator.h,v 1.42 1998/10/22 13:51:00 momjian Exp $ + * $Id: pg_operator.h,v 1.43 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 diff --git a/src/include/catalog/pg_proc.h b/src/include/catalog/pg_proc.h index 4677a8dc94f..ccf5e792502 100644 --- a/src/include/catalog/pg_proc.h +++ b/src/include/catalog/pg_proc.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: pg_proc.h,v 1.80 1998/10/22 13:51:02 momjian Exp $ + * $Id: pg_proc.h,v 1.81 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 ( netmask PGUID 11 f t f 1 f 25 "869" 100 0 0 100 foo bar )); +DATA(insert OID = 940 ( network_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 diff --git a/src/include/utils/builtins.h b/src/include/utils/builtins.h index e33c3ab9690..612d29a2574 100644 --- a/src/include/utils/builtins.h +++ b/src/include/utils/builtins.h @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: builtins.h,v 1.67 1998/10/22 13:51:07 momjian Exp $ + * $Id: builtins.h,v 1.68 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); |
