diff options
author | Pavan Deolasee | 2017-06-15 07:41:07 +0000 |
---|---|---|
committer | Pavan Deolasee | 2017-06-15 07:41:07 +0000 |
commit | 0ffa504a17f58f2bc045b0039f40e4917ee50d20 (patch) | |
tree | c629c449bcfcc45de1d03b2586e89932d546e8ba /src/backend/nodes | |
parent | 36ccc8d64e61fe9d77bb7ac62267945f7c146baa (diff) | |
parent | e800656d9a9b40b2f55afabe76354ab6d93353b3 (diff) |
Merge 'remotes/PGSQL/master' into xl10devel
Merge upstream master branch upto e800656d9a9b40b2f55afabe76354ab6d93353b3.
Code compiles and regression works ok (with lots and lots of failures though).
Diffstat (limited to 'src/backend/nodes')
-rw-r--r-- | src/backend/nodes/copyfuncs.c | 3 | ||||
-rw-r--r-- | src/backend/nodes/equalfuncs.c | 2 | ||||
-rw-r--r-- | src/backend/nodes/nodeFuncs.c | 30 | ||||
-rw-r--r-- | src/backend/nodes/outfuncs.c | 11 | ||||
-rw-r--r-- | src/backend/nodes/readfuncs.c | 11 |
5 files changed, 16 insertions, 41 deletions
diff --git a/src/backend/nodes/copyfuncs.c b/src/backend/nodes/copyfuncs.c index fc21909ea3..a1d056ff9f 100644 --- a/src/backend/nodes/copyfuncs.c +++ b/src/backend/nodes/copyfuncs.c @@ -2480,10 +2480,11 @@ _copyRangeTblEntry(const RangeTblEntry *from) COPY_STRING_FIELD(ctename); COPY_SCALAR_FIELD(ctelevelsup); COPY_SCALAR_FIELD(self_reference); - COPY_STRING_FIELD(enrname); COPY_NODE_FIELD(coltypes); COPY_NODE_FIELD(coltypmods); COPY_NODE_FIELD(colcollations); + COPY_STRING_FIELD(enrname); + COPY_SCALAR_FIELD(enrtuples); COPY_NODE_FIELD(alias); COPY_NODE_FIELD(eref); COPY_SCALAR_FIELD(lateral); diff --git a/src/backend/nodes/equalfuncs.c b/src/backend/nodes/equalfuncs.c index c644aba4c1..14a8167b04 100644 --- a/src/backend/nodes/equalfuncs.c +++ b/src/backend/nodes/equalfuncs.c @@ -2664,6 +2664,8 @@ _equalRangeTblEntry(const RangeTblEntry *a, const RangeTblEntry *b) COMPARE_NODE_FIELD(coltypes); COMPARE_NODE_FIELD(coltypmods); COMPARE_NODE_FIELD(colcollations); + COMPARE_STRING_FIELD(enrname); + COMPARE_SCALAR_FIELD(enrtuples); COMPARE_NODE_FIELD(alias); COMPARE_NODE_FIELD(eref); COMPARE_SCALAR_FIELD(lateral); diff --git a/src/backend/nodes/nodeFuncs.c b/src/backend/nodes/nodeFuncs.c index eb3e1ce1c1..2496a9a43c 100644 --- a/src/backend/nodes/nodeFuncs.c +++ b/src/backend/nodes/nodeFuncs.c @@ -694,39 +694,11 @@ expression_returns_set_walker(Node *node, void *context) /* else fall through to check args */ } - /* Avoid recursion for some cases that can't return a set */ + /* Avoid recursion for some cases that parser checks not to return a set */ if (IsA(node, Aggref)) return false; if (IsA(node, WindowFunc)) return false; - if (IsA(node, DistinctExpr)) - return false; - if (IsA(node, NullIfExpr)) - return false; - if (IsA(node, ScalarArrayOpExpr)) - return false; - if (IsA(node, BoolExpr)) - return false; - if (IsA(node, SubLink)) - return false; - if (IsA(node, SubPlan)) - return false; - if (IsA(node, AlternativeSubPlan)) - return false; - if (IsA(node, ArrayExpr)) - return false; - if (IsA(node, RowExpr)) - return false; - if (IsA(node, RowCompareExpr)) - return false; - if (IsA(node, CoalesceExpr)) - return false; - if (IsA(node, MinMaxExpr)) - return false; - if (IsA(node, SQLValueFunction)) - return false; - if (IsA(node, XmlExpr)) - return false; return expression_tree_walker(node, expression_returns_set_walker, context); diff --git a/src/backend/nodes/outfuncs.c b/src/backend/nodes/outfuncs.c index be3413436a..b56b04a82f 100644 --- a/src/backend/nodes/outfuncs.c +++ b/src/backend/nodes/outfuncs.c @@ -4135,6 +4135,7 @@ _outRangeTblEntry(StringInfo str, const RangeTblEntry *node) break; case RTE_NAMEDTUPLESTORE: WRITE_STRING_FIELD(enrname); + WRITE_FLOAT_FIELD(enrtuples, "%.0f"); WRITE_OID_FIELD(relid); WRITE_NODE_FIELD(coltypes); WRITE_NODE_FIELD(coltypmods); @@ -4640,7 +4641,7 @@ _outPartitionElem(StringInfo str, const PartitionElem *node) static void _outPartitionSpec(StringInfo str, const PartitionSpec *node) { - WRITE_NODE_TYPE("PARTITIONBY"); + WRITE_NODE_TYPE("PARTITIONSPEC"); WRITE_STRING_FIELD(strategy); WRITE_NODE_FIELD(partParams); @@ -4650,23 +4651,23 @@ _outPartitionSpec(StringInfo str, const PartitionSpec *node) static void _outPartitionBoundSpec(StringInfo str, const PartitionBoundSpec *node) { - WRITE_NODE_TYPE("PARTITIONBOUND"); + WRITE_NODE_TYPE("PARTITIONBOUNDSPEC"); WRITE_CHAR_FIELD(strategy); WRITE_NODE_FIELD(listdatums); WRITE_NODE_FIELD(lowerdatums); WRITE_NODE_FIELD(upperdatums); - /* XXX somebody forgot location field; too late to change for v10 */ + WRITE_LOCATION_FIELD(location); } static void _outPartitionRangeDatum(StringInfo str, const PartitionRangeDatum *node) { - WRITE_NODE_TYPE("PARTRANGEDATUM"); + WRITE_NODE_TYPE("PARTITIONRANGEDATUM"); WRITE_BOOL_FIELD(infinite); WRITE_NODE_FIELD(value); - /* XXX somebody forgot location field; too late to change for v10 */ + WRITE_LOCATION_FIELD(location); } /* diff --git a/src/backend/nodes/readfuncs.c b/src/backend/nodes/readfuncs.c index 5147eaa4d3..935bb196f7 100644 --- a/src/backend/nodes/readfuncs.c +++ b/src/backend/nodes/readfuncs.c @@ -1991,6 +1991,7 @@ _readRangeTblEntry(void) break; case RTE_NAMEDTUPLESTORE: READ_STRING_FIELD(enrname); + READ_FLOAT_FIELD(enrtuples); READ_OID_FIELD(relid); READ_NODE_FIELD(coltypes); READ_NODE_FIELD(coltypmods); @@ -3761,8 +3762,7 @@ _readPartitionBoundSpec(void) READ_NODE_FIELD(listdatums); READ_NODE_FIELD(lowerdatums); READ_NODE_FIELD(upperdatums); - /* XXX somebody forgot location field; too late to change for v10 */ - local_node->location = -1; + READ_LOCATION_FIELD(location); READ_DONE(); } @@ -3777,8 +3777,7 @@ _readPartitionRangeDatum(void) READ_BOOL_FIELD(infinite); READ_NODE_FIELD(value); - /* XXX somebody forgot location field; too late to change for v10 */ - local_node->location = -1; + READ_LOCATION_FIELD(location); READ_DONE(); } @@ -4029,9 +4028,9 @@ parseNodeString(void) return_value = _readRemoteStmt(); else if (MATCH("SIMPLESORT", 10)) return_value = _readSimpleSort(); - else if (MATCH("PARTITIONBOUND", 14)) + else if (MATCH("PARTITIONBOUNDSPEC", 18)) return_value = _readPartitionBoundSpec(); - else if (MATCH("PARTRANGEDATUM", 14)) + else if (MATCH("PARTITIONRANGEDATUM", 19)) return_value = _readPartitionRangeDatum(); else { |