File tree Expand file tree Collapse file tree 3 files changed +24
-9
lines changed
Expand file tree Collapse file tree 3 files changed +24
-9
lines changed Original file line number Diff line number Diff line change 2323#include "varatt.h"
2424#endif
2525
26+ #if PG_VERSION_NUM >= 170000
27+ #include "parser/scansup.h"
28+ #endif
29+
2630#define STATE_DIMS (x ) (ARR_DIMS(x)[0] - 1)
2731#define CreateStateDatums (dim ) palloc(sizeof(Datum) * (dim + 1))
2832
@@ -133,9 +137,9 @@ InitHalfVector(int dim)
133137 return result ;
134138}
135139
136- /*
137- * Check for whitespace, since array_isspace() is static
138- */
140+ #if PG_VERSION_NUM >= 170000
141+ #define halfvec_isspace ( ch ) scanner_isspace(ch)
142+ #else
139143static inline bool
140144halfvec_isspace (char ch )
141145{
@@ -148,6 +152,7 @@ halfvec_isspace(char ch)
148152 return true;
149153 return false;
150154}
155+ #endif
151156
152157/*
153158 * Check state array
Original file line number Diff line number Diff line change 2222#include "varatt.h"
2323#endif
2424
25+ #if PG_VERSION_NUM >= 170000
26+ #include "parser/scansup.h"
27+ #endif
28+
2529typedef struct SparseInputElement
2630{
2731 int32 index ;
@@ -155,9 +159,9 @@ InitSparseVector(int dim, int nnz)
155159 return result ;
156160}
157161
158- /*
159- * Check for whitespace, since array_isspace() is static
160- */
162+ #if PG_VERSION_NUM >= 170000
163+ #define sparsevec_isspace ( ch ) scanner_isspace(ch)
164+ #else
161165static inline bool
162166sparsevec_isspace (char ch )
163167{
@@ -170,6 +174,7 @@ sparsevec_isspace(char ch)
170174 return true;
171175 return false;
172176}
177+ #endif
173178
174179/*
175180 * Compare indices
Original file line number Diff line number Diff line change 2626#include "varatt.h"
2727#endif
2828
29+ #if PG_VERSION_NUM >= 170000
30+ #include "parser/scansup.h"
31+ #endif
32+
2933#define STATE_DIMS (x ) (ARR_DIMS(x)[0] - 1)
3034#define CreateStateDatums (dim ) palloc(sizeof(Datum) * (dim + 1))
3135
@@ -129,9 +133,9 @@ InitVector(int dim)
129133 return result ;
130134}
131135
132- /*
133- * Check for whitespace, since array_isspace() is static
134- */
136+ #if PG_VERSION_NUM >= 170000
137+ #define vector_isspace ( ch ) scanner_isspace(ch)
138+ #else
135139static inline bool
136140vector_isspace (char ch )
137141{
@@ -144,6 +148,7 @@ vector_isspace(char ch)
144148 return true;
145149 return false;
146150}
151+ #endif
147152
148153/*
149154 * Check state array
You can’t perform that action at this time.
0 commit comments