diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2004-06-13 21:57:28 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2004-06-13 21:57:28 +0000 |
commit | 950d047ec5913de0ff6f3badf636667926df0387 (patch) | |
tree | 3d97eae31381690a3af2d7321112e74649875cde /src/include/utils/inet.h | |
parent | 0e338bba42df2ec25d4507613c14ded7269a5db8 (diff) | |
download | postgresql-950d047ec5913de0ff6f3badf636667926df0387.tar.gz postgresql-950d047ec5913de0ff6f3badf636667926df0387.zip |
Give inet/cidr datatypes their own hash function that ignores the inet vs
cidr type bit, the same as network_eq does. This is needed for hash joins
and hash aggregation to work correctly on these types. Per bug report
from Michael Fuhr, 2004-04-13.
Also, improve hash function for int8 as suggested by Greg Stark.
Diffstat (limited to 'src/include/utils/inet.h')
-rw-r--r-- | src/include/utils/inet.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/include/utils/inet.h b/src/include/utils/inet.h index e1061028189..ed0e27b2a3f 100644 --- a/src/include/utils/inet.h +++ b/src/include/utils/inet.h @@ -7,7 +7,7 @@ * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/utils/inet.h,v 1.17 2003/11/29 22:41:15 pgsql Exp $ + * $PostgreSQL: pgsql/src/include/utils/inet.h,v 1.18 2004/06/13 21:57:26 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -20,10 +20,10 @@ */ typedef struct { - unsigned char family; - unsigned char bits; - unsigned char type; - unsigned char ip_addr[16]; /* 128 bits of address */ + unsigned char family; /* PGSQL_AF_INET or PGSQL_AF_INET6 */ + unsigned char bits; /* number of bits in netmask */ + unsigned char type; /* 0 = inet, 1 = cidr */ + unsigned char ipaddr[16]; /* up to 128 bits of address */ } inet_struct; /* |