mirror of https://github.com/citusdata/citus.git
PG15: handle pg_analyze_and_rewrite_* renaming.
From PG commit 791b1b71da.pull/5920/head
parent
33ee4877d4
commit
b6a5617ea8
|
@ -617,7 +617,8 @@ RewriteRawQueryStmt(RawStmt *rawStmt, const char *queryString, Oid *paramOids, i
|
||||||
numParams)
|
numParams)
|
||||||
{
|
{
|
||||||
List *queryTreeList =
|
List *queryTreeList =
|
||||||
pg_analyze_and_rewrite(rawStmt, queryString, paramOids, numParams, NULL);
|
pg_analyze_and_rewrite_fixedparams(rawStmt, queryString, paramOids, numParams,
|
||||||
|
NULL);
|
||||||
|
|
||||||
if (list_length(queryTreeList) != 1)
|
if (list_length(queryTreeList) != 1)
|
||||||
{
|
{
|
||||||
|
|
|
@ -49,7 +49,7 @@ deparse_shard_query_test(PG_FUNCTION_ARGS)
|
||||||
Node *parsetree = NULL;
|
Node *parsetree = NULL;
|
||||||
foreach_ptr(parsetree, parseTreeList)
|
foreach_ptr(parsetree, parseTreeList)
|
||||||
{
|
{
|
||||||
List *queryTreeList = pg_analyze_and_rewrite((RawStmt *) parsetree,
|
List *queryTreeList = pg_analyze_and_rewrite_fixedparams((RawStmt *) parsetree,
|
||||||
queryStringChar,
|
queryStringChar,
|
||||||
NULL, 0, NULL);
|
NULL, 0, NULL);
|
||||||
|
|
||||||
|
|
|
@ -259,7 +259,7 @@ relation_count_in_query(PG_FUNCTION_ARGS)
|
||||||
Node *parsetree = NULL;
|
Node *parsetree = NULL;
|
||||||
foreach_ptr(parsetree, parseTreeList)
|
foreach_ptr(parsetree, parseTreeList)
|
||||||
{
|
{
|
||||||
List *queryTreeList = pg_analyze_and_rewrite((RawStmt *) parsetree,
|
List *queryTreeList = pg_analyze_and_rewrite_fixedparams((RawStmt *) parsetree,
|
||||||
queryStringChar,
|
queryStringChar,
|
||||||
NULL, 0, NULL);
|
NULL, 0, NULL);
|
||||||
|
|
||||||
|
|
|
@ -34,6 +34,8 @@ typedef Value String;
|
||||||
#endif
|
#endif
|
||||||
#define RelationCreateStorage_compat(a, b, c) RelationCreateStorage(a, b)
|
#define RelationCreateStorage_compat(a, b, c) RelationCreateStorage(a, b)
|
||||||
#define pgstat_init_relation(r) pgstat_initstats(r)
|
#define pgstat_init_relation(r) pgstat_initstats(r)
|
||||||
|
#define pg_analyze_and_rewrite_fixedparams(a, b, c, d, e) pg_analyze_and_rewrite(a, b, c, \
|
||||||
|
d, e)
|
||||||
|
|
||||||
static inline int64
|
static inline int64
|
||||||
pg_strtoint64(char *s)
|
pg_strtoint64(char *s)
|
||||||
|
|
Loading…
Reference in New Issue