Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit b8fe12a

Browse files
committed
Reconcile nodes/*funcs.c with recent work.
A few of the discrepancies had semantic significance, but I did not track down the resulting user-visible bugs, if any. Back-patch to 9.5, where all but one discrepancy appeared. The _equalCreateEventTrigStmt() situation dates to 9.3 but does not affect semantics. catversion bump due to readfuncs.c field order changes.
1 parent c261706 commit b8fe12a

File tree

5 files changed

+14
-11
lines changed

5 files changed

+14
-11
lines changed

src/backend/nodes/copyfuncs.c

+3-2
Original file line numberDiff line numberDiff line change
@@ -647,6 +647,7 @@ _copyCustomScan(const CustomScan *from)
647647
* copy remainder of node
648648
*/
649649
COPY_SCALAR_FIELD(flags);
650+
COPY_NODE_FIELD(custom_plans);
650651
COPY_NODE_FIELD(custom_exprs);
651652
COPY_NODE_FIELD(custom_private);
652653
COPY_NODE_FIELD(custom_scan_tlist);
@@ -1925,9 +1926,9 @@ _copyOnConflictExpr(const OnConflictExpr *from)
19251926
COPY_SCALAR_FIELD(action);
19261927
COPY_NODE_FIELD(arbiterElems);
19271928
COPY_NODE_FIELD(arbiterWhere);
1929+
COPY_SCALAR_FIELD(constraint);
19281930
COPY_NODE_FIELD(onConflictSet);
19291931
COPY_NODE_FIELD(onConflictWhere);
1930-
COPY_SCALAR_FIELD(constraint);
19311932
COPY_SCALAR_FIELD(exclRelIndex);
19321933
COPY_NODE_FIELD(exclRelTlist);
19331934

@@ -4082,7 +4083,7 @@ _copyCreatePolicyStmt(const CreatePolicyStmt *from)
40824083

40834084
COPY_STRING_FIELD(policy_name);
40844085
COPY_NODE_FIELD(table);
4085-
COPY_SCALAR_FIELD(cmd);
4086+
COPY_STRING_FIELD(cmd);
40864087
COPY_NODE_FIELD(roles);
40874088
COPY_NODE_FIELD(qual);
40884089
COPY_NODE_FIELD(with_check);

src/backend/nodes/equalfuncs.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -759,9 +759,9 @@ _equalOnConflictExpr(const OnConflictExpr *a, const OnConflictExpr *b)
759759
COMPARE_SCALAR_FIELD(action);
760760
COMPARE_NODE_FIELD(arbiterElems);
761761
COMPARE_NODE_FIELD(arbiterWhere);
762+
COMPARE_SCALAR_FIELD(constraint);
762763
COMPARE_NODE_FIELD(onConflictSet);
763764
COMPARE_NODE_FIELD(onConflictWhere);
764-
COMPARE_SCALAR_FIELD(constraint);
765765
COMPARE_SCALAR_FIELD(exclRelIndex);
766766
COMPARE_NODE_FIELD(exclRelTlist);
767767

@@ -1868,8 +1868,8 @@ _equalCreateEventTrigStmt(const CreateEventTrigStmt *a, const CreateEventTrigStm
18681868
{
18691869
COMPARE_STRING_FIELD(trigname);
18701870
COMPARE_STRING_FIELD(eventname);
1871-
COMPARE_NODE_FIELD(funcname);
18721871
COMPARE_NODE_FIELD(whenclause);
1872+
COMPARE_NODE_FIELD(funcname);
18731873

18741874
return true;
18751875
}
@@ -2074,7 +2074,7 @@ _equalCreatePolicyStmt(const CreatePolicyStmt *a, const CreatePolicyStmt *b)
20742074
{
20752075
COMPARE_STRING_FIELD(policy_name);
20762076
COMPARE_NODE_FIELD(table);
2077-
COMPARE_SCALAR_FIELD(cmd);
2077+
COMPARE_STRING_FIELD(cmd);
20782078
COMPARE_NODE_FIELD(roles);
20792079
COMPARE_NODE_FIELD(qual);
20802080
COMPARE_NODE_FIELD(with_check);

src/backend/nodes/outfuncs.c

+5-3
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,7 @@ _outModifyTable(StringInfo str, const ModifyTable *node)
341341
WRITE_NODE_FIELD(arbiterIndexes);
342342
WRITE_NODE_FIELD(onConflictSet);
343343
WRITE_NODE_FIELD(onConflictWhere);
344-
WRITE_INT_FIELD(exclRelRTI);
344+
WRITE_UINT_FIELD(exclRelRTI);
345345
WRITE_NODE_FIELD(exclRelTlist);
346346
}
347347

@@ -591,6 +591,7 @@ _outCustomScan(StringInfo str, const CustomScan *node)
591591
_outScanInfo(str, (const Scan *) node);
592592

593593
WRITE_UINT_FIELD(flags);
594+
WRITE_NODE_FIELD(custom_plans);
594595
WRITE_NODE_FIELD(custom_exprs);
595596
WRITE_NODE_FIELD(custom_private);
596597
WRITE_NODE_FIELD(custom_scan_tlist);
@@ -1016,7 +1017,7 @@ _outGroupingFunc(StringInfo str, const GroupingFunc *node)
10161017
WRITE_NODE_FIELD(args);
10171018
WRITE_NODE_FIELD(refs);
10181019
WRITE_NODE_FIELD(cols);
1019-
WRITE_INT_FIELD(agglevelsup);
1020+
WRITE_UINT_FIELD(agglevelsup);
10201021
WRITE_LOCATION_FIELD(location);
10211022
}
10221023

@@ -1532,9 +1533,9 @@ _outOnConflictExpr(StringInfo str, const OnConflictExpr *node)
15321533
WRITE_ENUM_FIELD(action, OnConflictAction);
15331534
WRITE_NODE_FIELD(arbiterElems);
15341535
WRITE_NODE_FIELD(arbiterWhere);
1536+
WRITE_OID_FIELD(constraint);
15351537
WRITE_NODE_FIELD(onConflictSet);
15361538
WRITE_NODE_FIELD(onConflictWhere);
1537-
WRITE_OID_FIELD(constraint);
15381539
WRITE_INT_FIELD(exclRelIndex);
15391540
WRITE_NODE_FIELD(exclRelTlist);
15401541
}
@@ -1674,6 +1675,7 @@ _outCustomPath(StringInfo str, const CustomPath *node)
16741675
_outPathInfo(str, (const Path *) node);
16751676

16761677
WRITE_UINT_FIELD(flags);
1678+
WRITE_NODE_FIELD(custom_paths);
16771679
WRITE_NODE_FIELD(custom_private);
16781680
appendStringInfoString(str, " :methods ");
16791681
_outToken(str, node->methods->CustomName);

src/backend/nodes/readfuncs.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,7 @@ _readGroupingFunc(void)
538538
READ_NODE_FIELD(args);
539539
READ_NODE_FIELD(refs);
540540
READ_NODE_FIELD(cols);
541-
READ_INT_FIELD(agglevelsup);
541+
READ_UINT_FIELD(agglevelsup);
542542
READ_LOCATION_FIELD(location);
543543

544544
READ_DONE();
@@ -1256,9 +1256,9 @@ _readOnConflictExpr(void)
12561256
READ_ENUM_FIELD(action, OnConflictAction);
12571257
READ_NODE_FIELD(arbiterElems);
12581258
READ_NODE_FIELD(arbiterWhere);
1259+
READ_OID_FIELD(constraint);
12591260
READ_NODE_FIELD(onConflictSet);
12601261
READ_NODE_FIELD(onConflictWhere);
1261-
READ_OID_FIELD(constraint);
12621262
READ_INT_FIELD(exclRelIndex);
12631263
READ_NODE_FIELD(exclRelTlist);
12641264

src/include/catalog/catversion.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,6 @@
5353
*/
5454

5555
/* yyyymmddN */
56-
#define CATALOG_VERSION_NO 201507282
56+
#define CATALOG_VERSION_NO 201508062
5757

5858
#endif

0 commit comments

Comments
 (0)