Give inet/cidr datatypes their own hash function that ignores the inet vs
Tom Lane <tgl@sss.pgh.pa.us>
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.
Files
| Path | Change | +/− |
|---|---|---|
| src/backend/access/hash/hashfunc.c | modified | +20 −2 |
| src/backend/utils/adt/network.c | modified | +25 −4 |
| src/include/catalog/catversion.h | modified | +2 −2 |
| src/include/catalog/pg_amproc.h | modified | +3 −3 |
| src/include/catalog/pg_proc.h | modified | +3 −1 |
| src/include/utils/builtins.h | modified | +2 −1 |
| src/include/utils/inet.h | modified | +5 −5 |
| src/test/regress/expected/opr_sanity.out | modified | +10 −0 |
| src/test/regress/sql/opr_sanity.sql | modified | +7 −0 |