Move strategy numbers to include/access/stratnum.h
For upcoming BRIN opclasses, it's convenient to have strategy numbers
defined in a single place. Since there's nothing appropriate, create
it. The StrategyNumber typedef now lives there, as well as existing
strategy numbers for B-trees (from skey.h) and R-tree-and-friends (from
gist.h). skey.h is forced to include stratnum.h because of the
StrategyNumber typedef, but gist.h is not; extensions that currently
rely on gist.h for rtree strategy numbers might need to add a new
A few .c files can stop including skey.h and/or gist.h, which is a nice
side benefit.
Per discussion:
https://www.postgresql.org/message-id/20150514232132.GZ2523@alvh.no-ip.org
Authored by Emre Hasegeli and Álvaro.
(It's not clear to me why bootscanner.l has any #include lines at all.)
Branch
------
master
Details
-------
http://git.postgresql.org/pg/commitdiff/26df7066cc229887d4defdf1d105c0a22b8a88fb
Modified Files
--------------
contrib/btree_gin/btree_gin.c | 2 +-
contrib/cube/cube.c | 2 +-
contrib/hstore/hstore_gin.c | 2 +-
contrib/hstore/hstore_gist.c | 2 +-
contrib/intarray/_int_gin.c | 3 +-
contrib/intarray/_int_gist.c | 2 +-
contrib/intarray/_intbig_gist.c | 2 +-
contrib/ltree/_ltree_gist.c | 2 +-
contrib/ltree/ltree_gist.c | 2 +-
contrib/pg_trgm/trgm_gin.c | 3 +-
contrib/pg_trgm/trgm_gist.c | 3 +-
contrib/seg/seg.c | 3 +-
src/backend/access/brin/brin_minmax.c | 2 +-
src/backend/access/gin/ginarrayproc.c | 2 +-
src/backend/access/gist/gistproc.c | 2 +-
src/backend/access/spgist/spgkdtreeproc.c | 2 +-
src/backend/access/spgist/spgquadtreeproc.c | 2 +-
src/backend/bootstrap/bootparse.y | 1 -
src/backend/bootstrap/bootscanner.l | 1 -
src/backend/optimizer/path/equivclass.c | 2 +-
src/backend/optimizer/path/indxpath.c | 2 +-
src/backend/optimizer/path/pathkeys.c | 2 +-
src/backend/optimizer/plan/createplan.c | 2 +-
src/backend/optimizer/util/predtest.c | 2 +-
src/backend/utils/adt/jsonb_gin.c | 2 +-
src/backend/utils/adt/network_gist.c | 24 ++++-----
src/backend/utils/adt/rangetypes_gist.c | 2 +-
src/backend/utils/adt/rangetypes_spgist.c | 2 +-
src/backend/utils/adt/tsginidx.c | 2 +-
src/backend/utils/adt/tsquery_gist.c | 2 +-
src/include/access/gist.h | 20 -------
src/include/access/nbtree.h | 2 +-
src/include/access/skey.h | 23 +-------
src/include/access/stratnum.h | 75 +++++++++++++++++++++++++++
src/include/utils/rangetypes.h | 20 +++----
35 files changed, 129 insertions(+), 95 deletions(-)