summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorAlvaro Herrera2015-05-15 20:03:16 +0000
committerAlvaro Herrera2015-05-15 20:03:16 +0000
commit26df7066cc229887d4defdf1d105c0a22b8a88fb (patch)
tree5b9cd2cefa7c52d703f9d51a48426f9820118f03 /contrib
parent1e98fa0bf8de9d25d97fb346755a9c9c17bba549 (diff)
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.)
Diffstat (limited to 'contrib')
-rw-r--r--contrib/btree_gin/btree_gin.c2
-rw-r--r--contrib/cube/cube.c2
-rw-r--r--contrib/hstore/hstore_gin.c2
-rw-r--r--contrib/hstore/hstore_gist.c2
-rw-r--r--contrib/intarray/_int_gin.c3
-rw-r--r--contrib/intarray/_int_gist.c2
-rw-r--r--contrib/intarray/_intbig_gist.c2
-rw-r--r--contrib/ltree/_ltree_gist.c2
-rw-r--r--contrib/ltree/ltree_gist.c2
-rw-r--r--contrib/pg_trgm/trgm_gin.c3
-rw-r--r--contrib/pg_trgm/trgm_gist.c3
-rw-r--r--contrib/seg/seg.c3
12 files changed, 15 insertions, 13 deletions
diff --git a/contrib/btree_gin/btree_gin.c b/contrib/btree_gin/btree_gin.c
index 1a5bb3cdc65..6e3bf172e50 100644
--- a/contrib/btree_gin/btree_gin.c
+++ b/contrib/btree_gin/btree_gin.c
@@ -5,7 +5,7 @@
#include <limits.h>
-#include "access/skey.h"
+#include "access/stratnum.h"
#include "utils/builtins.h"
#include "utils/bytea.h"
#include "utils/cash.h"
diff --git a/contrib/cube/cube.c b/contrib/cube/cube.c
index b9ccad994a8..113c66383ac 100644
--- a/contrib/cube/cube.c
+++ b/contrib/cube/cube.c
@@ -12,7 +12,7 @@
#include <math.h>
#include "access/gist.h"
-#include "access/skey.h"
+#include "access/stratnum.h"
#include "utils/array.h"
#include "utils/builtins.h"
diff --git a/contrib/hstore/hstore_gin.c b/contrib/hstore/hstore_gin.c
index 68f9061db14..919181d375e 100644
--- a/contrib/hstore/hstore_gin.c
+++ b/contrib/hstore/hstore_gin.c
@@ -4,7 +4,7 @@
#include "postgres.h"
#include "access/gin.h"
-#include "access/skey.h"
+#include "access/stratnum.h"
#include "catalog/pg_type.h"
#include "hstore.h"
diff --git a/contrib/hstore/hstore_gist.c b/contrib/hstore/hstore_gist.c
index 06f3c9359b9..dde37fb6e60 100644
--- a/contrib/hstore/hstore_gist.c
+++ b/contrib/hstore/hstore_gist.c
@@ -4,7 +4,7 @@
#include "postgres.h"
#include "access/gist.h"
-#include "access/skey.h"
+#include "access/stratnum.h"
#include "catalog/pg_type.h"
#include "utils/pg_crc.h"
diff --git a/contrib/intarray/_int_gin.c b/contrib/intarray/_int_gin.c
index 58352cac807..fb16b66edb0 100644
--- a/contrib/intarray/_int_gin.c
+++ b/contrib/intarray/_int_gin.c
@@ -4,8 +4,7 @@
#include "postgres.h"
#include "access/gin.h"
-#include "access/gist.h"
-#include "access/skey.h"
+#include "access/stratnum.h"
#include "_int.h"
diff --git a/contrib/intarray/_int_gist.c b/contrib/intarray/_int_gist.c
index 07108eb15eb..888c277e60f 100644
--- a/contrib/intarray/_int_gist.c
+++ b/contrib/intarray/_int_gist.c
@@ -6,7 +6,7 @@
#include <limits.h>
#include "access/gist.h"
-#include "access/skey.h"
+#include "access/stratnum.h"
#include "_int.h"
diff --git a/contrib/intarray/_intbig_gist.c b/contrib/intarray/_intbig_gist.c
index 235db389572..6dae7c91c12 100644
--- a/contrib/intarray/_intbig_gist.c
+++ b/contrib/intarray/_intbig_gist.c
@@ -4,7 +4,7 @@
#include "postgres.h"
#include "access/gist.h"
-#include "access/skey.h"
+#include "access/stratnum.h"
#include "_int.h"
diff --git a/contrib/ltree/_ltree_gist.c b/contrib/ltree/_ltree_gist.c
index 41be68d7ee6..37cd9916942 100644
--- a/contrib/ltree/_ltree_gist.c
+++ b/contrib/ltree/_ltree_gist.c
@@ -8,7 +8,7 @@
#include "postgres.h"
#include "access/gist.h"
-#include "access/skey.h"
+#include "access/stratnum.h"
#include "crc32.h"
#include "ltree.h"
diff --git a/contrib/ltree/ltree_gist.c b/contrib/ltree/ltree_gist.c
index 2d89f1aed4c..83da62018e3 100644
--- a/contrib/ltree/ltree_gist.c
+++ b/contrib/ltree/ltree_gist.c
@@ -6,7 +6,7 @@
#include "postgres.h"
#include "access/gist.h"
-#include "access/skey.h"
+#include "access/stratnum.h"
#include "crc32.h"
#include "ltree.h"
diff --git a/contrib/pg_trgm/trgm_gin.c b/contrib/pg_trgm/trgm_gin.c
index c59925c5750..d524ceaa19e 100644
--- a/contrib/pg_trgm/trgm_gin.c
+++ b/contrib/pg_trgm/trgm_gin.c
@@ -6,7 +6,8 @@
#include "trgm.h"
#include "access/gin.h"
-#include "access/skey.h"
+#include "access/stratnum.h"
+#include "fmgr.h"
PG_FUNCTION_INFO_V1(gin_extract_trgm);
diff --git a/contrib/pg_trgm/trgm_gist.c b/contrib/pg_trgm/trgm_gist.c
index 69dc7f71f07..07d1dc308bb 100644
--- a/contrib/pg_trgm/trgm_gist.c
+++ b/contrib/pg_trgm/trgm_gist.c
@@ -5,7 +5,8 @@
#include "trgm.h"
-#include "access/skey.h"
+#include "access/stratnum.h"
+#include "fmgr.h"
typedef struct
diff --git a/contrib/seg/seg.c b/contrib/seg/seg.c
index 8e2d5343ae9..1e6c37d9e1a 100644
--- a/contrib/seg/seg.c
+++ b/contrib/seg/seg.c
@@ -12,7 +12,8 @@
#include <float.h>
#include "access/gist.h"
-#include "access/skey.h"
+#include "access/stratnum.h"
+#include "fmgr.h"
#include "segdata.h"