Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit31fb4df

Browse files
committed
Do not write out WCOs in Query
The WithCheckOptions list in Query are only populated during rewrite anddo not need to be written out or read in as part of a Query structure.Further, move WithCheckOptions to the bottom and add comments to clarifythat it is only populated during rewrite.Back-patch to 9.5 with a catversion bump, as we are still in alpha.
1 parent0577821 commit31fb4df

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

‎src/backend/nodes/copyfuncs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2701,7 +2701,6 @@ _copyQuery(const Query *from)
27012701
COPY_NODE_FIELD(rtable);
27022702
COPY_NODE_FIELD(jointree);
27032703
COPY_NODE_FIELD(targetList);
2704-
COPY_NODE_FIELD(withCheckOptions);
27052704
COPY_NODE_FIELD(onConflict);
27062705
COPY_NODE_FIELD(returningList);
27072706
COPY_NODE_FIELD(groupClause);
@@ -2715,6 +2714,7 @@ _copyQuery(const Query *from)
27152714
COPY_NODE_FIELD(rowMarks);
27162715
COPY_NODE_FIELD(setOperations);
27172716
COPY_NODE_FIELD(constraintDeps);
2717+
COPY_NODE_FIELD(withCheckOptions);
27182718

27192719
returnnewnode;
27202720
}

‎src/backend/nodes/equalfuncs.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -906,7 +906,6 @@ _equalQuery(const Query *a, const Query *b)
906906
COMPARE_NODE_FIELD(rtable);
907907
COMPARE_NODE_FIELD(jointree);
908908
COMPARE_NODE_FIELD(targetList);
909-
COMPARE_NODE_FIELD(withCheckOptions);
910909
COMPARE_NODE_FIELD(onConflict);
911910
COMPARE_NODE_FIELD(returningList);
912911
COMPARE_NODE_FIELD(groupClause);
@@ -920,6 +919,7 @@ _equalQuery(const Query *a, const Query *b)
920919
COMPARE_NODE_FIELD(rowMarks);
921920
COMPARE_NODE_FIELD(setOperations);
922921
COMPARE_NODE_FIELD(constraintDeps);
922+
COMPARE_NODE_FIELD(withCheckOptions);
923923

924924
return true;
925925
}

‎src/backend/nodes/outfuncs.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2379,7 +2379,6 @@ _outQuery(StringInfo str, const Query *node)
23792379
WRITE_NODE_FIELD(rtable);
23802380
WRITE_NODE_FIELD(jointree);
23812381
WRITE_NODE_FIELD(targetList);
2382-
WRITE_NODE_FIELD(withCheckOptions);
23832382
WRITE_NODE_FIELD(onConflict);
23842383
WRITE_NODE_FIELD(returningList);
23852384
WRITE_NODE_FIELD(groupClause);

‎src/backend/nodes/readfuncs.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -213,7 +213,6 @@ _readQuery(void)
213213
READ_NODE_FIELD(rtable);
214214
READ_NODE_FIELD(jointree);
215215
READ_NODE_FIELD(targetList);
216-
READ_NODE_FIELD(withCheckOptions);
217216
READ_NODE_FIELD(onConflict);
218217
READ_NODE_FIELD(returningList);
219218
READ_NODE_FIELD(groupClause);

‎src/include/catalog/catversion.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,6 @@
5353
*/
5454

5555
/*yyyymmddN */
56-
#defineCATALOG_VERSION_NO201510041
56+
#defineCATALOG_VERSION_NO201510051
5757

5858
#endif

‎src/include/nodes/parsenodes.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,6 @@ typedef struct Query
130130

131131
List*targetList;/* target list (of TargetEntry) */
132132

133-
List*withCheckOptions;/* a list of WithCheckOption's */
134-
135133
OnConflictExpr*onConflict;/* ON CONFLICT DO [NOTHING | UPDATE] */
136134

137135
List*returningList;/* return-values list (of TargetEntry) */
@@ -158,6 +156,10 @@ typedef struct Query
158156

159157
List*constraintDeps;/* a list of pg_constraint OIDs that the query
160158
* depends on to be semantically valid */
159+
160+
List*withCheckOptions;/* a list of WithCheckOption's, which are
161+
* only added during rewrite and therefore
162+
* are not written out as part of Query. */
161163
}Query;
162164

163165

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp