Skip to content

Commit 26df706

Browse files
committed
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.)
1 parent 1e98fa0 commit 26df706

35 files changed

+129
-95
lines changed

contrib/btree_gin/btree_gin.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
#include <limits.h>
77

8-
#include "access/skey.h"
8+
#include "access/stratnum.h"
99
#include "utils/builtins.h"
1010
#include "utils/bytea.h"
1111
#include "utils/cash.h"

contrib/cube/cube.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#include <math.h>
1313

1414
#include "access/gist.h"
15-
#include "access/skey.h"
15+
#include "access/stratnum.h"
1616
#include "utils/array.h"
1717
#include "utils/builtins.h"
1818

contrib/hstore/hstore_gin.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#include "postgres.h"
55

66
#include "access/gin.h"
7-
#include "access/skey.h"
7+
#include "access/stratnum.h"
88
#include "catalog/pg_type.h"
99

1010
#include "hstore.h"

contrib/hstore/hstore_gist.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#include "postgres.h"
55

66
#include "access/gist.h"
7-
#include "access/skey.h"
7+
#include "access/stratnum.h"
88
#include "catalog/pg_type.h"
99
#include "utils/pg_crc.h"
1010

contrib/intarray/_int_gin.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,7 @@
44
#include "postgres.h"
55

66
#include "access/gin.h"
7-
#include "access/gist.h"
8-
#include "access/skey.h"
7+
#include "access/stratnum.h"
98

109
#include "_int.h"
1110

contrib/intarray/_int_gist.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#include <limits.h>
77

88
#include "access/gist.h"
9-
#include "access/skey.h"
9+
#include "access/stratnum.h"
1010

1111
#include "_int.h"
1212

contrib/intarray/_intbig_gist.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#include "postgres.h"
55

66
#include "access/gist.h"
7-
#include "access/skey.h"
7+
#include "access/stratnum.h"
88

99
#include "_int.h"
1010

contrib/ltree/_ltree_gist.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#include "postgres.h"
99

1010
#include "access/gist.h"
11-
#include "access/skey.h"
11+
#include "access/stratnum.h"
1212
#include "crc32.h"
1313
#include "ltree.h"
1414

contrib/ltree/ltree_gist.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#include "postgres.h"
77

88
#include "access/gist.h"
9-
#include "access/skey.h"
9+
#include "access/stratnum.h"
1010
#include "crc32.h"
1111
#include "ltree.h"
1212

contrib/pg_trgm/trgm_gin.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
#include "trgm.h"
77

88
#include "access/gin.h"
9-
#include "access/skey.h"
9+
#include "access/stratnum.h"
10+
#include "fmgr.h"
1011

1112

1213
PG_FUNCTION_INFO_V1(gin_extract_trgm);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy