diff options
| author | Alvaro Herrera | 2019-03-11 16:17:50 +0000 |
|---|---|---|
| committer | Alvaro Herrera | 2019-03-11 16:17:50 +0000 |
| commit | af38498d4c9b840e0e454574519459edda3871db (patch) | |
| tree | 52c5240ef125da9eabad5d610961f422f13de733 /contrib | |
| parent | b212245f96437b574b59993c772e4d9276965e49 (diff) | |
Move hash_any prototype from access/hash.h to utils/hashutils.h
... as well as its implementation from backend/access/hash/hashfunc.c to
backend/utils/hash/hashfn.c.
access/hash is the place for the hash index AM, not really appropriate
for generic facilities, which is what hash_any is; having things the old
way meant that anything using hash_any had to include the AM's include
file, pointlessly polluting its namespace with unrelated, unnecessary
cruft.
Also move the HTEqual strategy number to access/stratnum.h from
access/hash.h.
To avoid breaking third-party extension code, add an #include
"utils/hashutils.h" to access/hash.h. (An easily removed line by
committers who enjoy their asbestos suits to protect them from angry
extension authors.)
Discussion: https://postgr.es/m/201901251935.ser5e4h6djt2@alvherre.pgsql
Diffstat (limited to 'contrib')
| -rw-r--r-- | contrib/citext/citext.c | 2 | ||||
| -rw-r--r-- | contrib/hstore/hstore_op.c | 2 | ||||
| -rw-r--r-- | contrib/pg_stat_statements/pg_stat_statements.c | 2 | ||||
| -rw-r--r-- | contrib/sepgsql/uavc.c | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/contrib/citext/citext.c b/contrib/citext/citext.c index 24ceeb11fc2..a4adafe8958 100644 --- a/contrib/citext/citext.c +++ b/contrib/citext/citext.c @@ -3,10 +3,10 @@ */ #include "postgres.h" -#include "access/hash.h" #include "catalog/pg_collation.h" #include "utils/builtins.h" #include "utils/formatting.h" +#include "utils/hashutils.h" #include "utils/varlena.h" PG_MODULE_MAGIC; diff --git a/contrib/hstore/hstore_op.c b/contrib/hstore/hstore_op.c index b852fb5a8ac..87f1aef3a34 100644 --- a/contrib/hstore/hstore_op.c +++ b/contrib/hstore/hstore_op.c @@ -3,11 +3,11 @@ */ #include "postgres.h" -#include "access/hash.h" #include "access/htup_details.h" #include "catalog/pg_type.h" #include "funcapi.h" #include "utils/builtins.h" +#include "utils/hashutils.h" #include "utils/memutils.h" #include "hstore.h" diff --git a/contrib/pg_stat_statements/pg_stat_statements.c b/contrib/pg_stat_statements/pg_stat_statements.c index 7b39283c899..16b8074a006 100644 --- a/contrib/pg_stat_statements/pg_stat_statements.c +++ b/contrib/pg_stat_statements/pg_stat_statements.c @@ -61,7 +61,6 @@ #include <sys/stat.h> #include <unistd.h> -#include "access/hash.h" #include "catalog/pg_authid.h" #include "executor/instrument.h" #include "funcapi.h" @@ -78,6 +77,7 @@ #include "tcop/utility.h" #include "utils/acl.h" #include "utils/builtins.h" +#include "utils/hashutils.h" #include "utils/memutils.h" PG_MODULE_MAGIC; diff --git a/contrib/sepgsql/uavc.c b/contrib/sepgsql/uavc.c index fce6e987854..7d94c31e56e 100644 --- a/contrib/sepgsql/uavc.c +++ b/contrib/sepgsql/uavc.c @@ -12,11 +12,11 @@ */ #include "postgres.h" -#include "access/hash.h" #include "catalog/pg_proc.h" #include "commands/seclabel.h" #include "storage/ipc.h" #include "utils/guc.h" +#include "utils/hashutils.h" #include "utils/memutils.h" #include "sepgsql.h" |
