From 44982e7d09cf9b1a08fded7fb0ca9a60dae869a5 Mon Sep 17 00:00:00 2001 From: Noah Misch Date: Sun, 9 Jun 2019 14:00:36 -0700 Subject: [PATCH] Reconcile nodes/*funcs.c with PostgreSQL 12 work. One would have needed out-of-tree code to observe the defects. Remove unreferenced fields instead of completing their support functions. Since in-tree code can't reach _readIntoClause(), no catversion bump. --- src/backend/nodes/outfuncs.c | 2 +- src/backend/parser/parse_node.c | 2 -- src/include/nodes/parsenodes.h | 1 - src/include/nodes/primnodes.h | 2 -- 4 files changed, 1 insertion(+), 6 deletions(-) diff --git a/src/backend/nodes/outfuncs.c b/src/backend/nodes/outfuncs.c index 237598e110..8400dd319e 100644 --- a/src/backend/nodes/outfuncs.c +++ b/src/backend/nodes/outfuncs.c @@ -1048,7 +1048,7 @@ _outIntoClause(StringInfo str, const IntoClause *node) WRITE_NODE_FIELD(rel); WRITE_NODE_FIELD(colNames); - WRITE_NODE_FIELD(accessMethod); + WRITE_STRING_FIELD(accessMethod); WRITE_NODE_FIELD(options); WRITE_ENUM_FIELD(onCommit, OnCommitAction); WRITE_STRING_FIELD(tableSpaceName); diff --git a/src/backend/parser/parse_node.c b/src/backend/parser/parse_node.c index 3a7a858e3a..1baf7ef31f 100644 --- a/src/backend/parser/parse_node.c +++ b/src/backend/parser/parse_node.c @@ -306,7 +306,6 @@ transformContainerSubscripts(ParseState *pstate, bool isSlice = false; List *upperIndexpr = NIL; List *lowerIndexpr = NIL; - List *indexprSlice = NIL; ListCell *idx; SubscriptingRef *sbsref; @@ -450,7 +449,6 @@ transformContainerSubscripts(ParseState *pstate, /* refcollid will be set by parse_collate.c */ sbsref->refupperindexpr = upperIndexpr; sbsref->reflowerindexpr = lowerIndexpr; - sbsref->refindexprslice = indexprSlice; sbsref->refexpr = (Expr *) containerBase; sbsref->refassgnexpr = (Expr *) assignFrom; diff --git a/src/include/nodes/parsenodes.h b/src/include/nodes/parsenodes.h index 2a8edf934f..94ded3c135 100644 --- a/src/include/nodes/parsenodes.h +++ b/src/include/nodes/parsenodes.h @@ -2139,7 +2139,6 @@ typedef struct Constraint Node *raw_expr; /* expr, as untransformed parse tree */ char *cooked_expr; /* expr, as nodeToString representation */ char generated_when; /* ALWAYS or BY DEFAULT */ - char generated_kind; /* currently always STORED */ /* Fields used for unique constraints (UNIQUE and PRIMARY KEY): */ List *keys; /* String nodes naming referenced key diff --git a/src/include/nodes/primnodes.h b/src/include/nodes/primnodes.h index f9b1cf2df7..7c278c0e56 100644 --- a/src/include/nodes/primnodes.h +++ b/src/include/nodes/primnodes.h @@ -410,8 +410,6 @@ typedef struct SubscriptingRef List *reflowerindexpr; /* expressions that evaluate to lower * container indexes, or NIL for single * container element */ - List *refindexprslice; /* whether or not related indexpr from - * reflowerindexpr is a slice */ Expr *refexpr; /* the expression that evaluates to a * container value */ -- 2.40.0