node-support-cleanup-v1.patch
text/plain
Filename: node-support-cleanup-v1.patch
Type: text/plain
Part: 0
Message:
nodes/*funcs.c inconsistencies
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: unified
Series: patch v1
| File | + | − |
|---|---|---|
| src/backend/nodes/copyfuncs.c | 0 | 0 |
diff --git a/src/backend/nodes/copyfuncs.c b/src/backend/nodes/copyfuncs.c
index c94799b..eed0ea4 100644
*** a/src/backend/nodes/copyfuncs.c
--- b/src/backend/nodes/copyfuncs.c
***************
*** 2891,2896 **** _copyRenameStmt(const RenameStmt *from)
--- 2891,2897 ----
RenameStmt *newnode = makeNode(RenameStmt);
COPY_SCALAR_FIELD(renameType);
+ COPY_SCALAR_FIELD(relationType);
COPY_NODE_FIELD(relation);
COPY_NODE_FIELD(object);
COPY_NODE_FIELD(objarg);
***************
*** 3047,3052 **** _copyViewStmt(const ViewStmt *from)
--- 3048,3054 ----
COPY_NODE_FIELD(aliases);
COPY_NODE_FIELD(query);
COPY_SCALAR_FIELD(replace);
+ COPY_NODE_FIELD(options);
return newnode;
}
***************
*** 3650,3656 **** _copyReassignOwnedStmt(const ReassignOwnedStmt *from)
ReassignOwnedStmt *newnode = makeNode(ReassignOwnedStmt);
COPY_NODE_FIELD(roles);
! COPY_SCALAR_FIELD(newrole);
return newnode;
}
--- 3652,3658 ----
ReassignOwnedStmt *newnode = makeNode(ReassignOwnedStmt);
COPY_NODE_FIELD(roles);
! COPY_STRING_FIELD(newrole);
return newnode;
}
diff --git a/src/backend/nodes/equalindex 9564210..c06b068 100644
*** a/src/backend/nodes/equalfuncs.c
--- b/src/backend/nodes/equalfuncs.c
***************
*** 1306,1311 **** static bool
--- 1306,1312 ----
_equalRenameStmt(const RenameStmt *a, const RenameStmt *b)
{
COMPARE_SCALAR_FIELD(renameType);
+ COMPARE_SCALAR_FIELD(relationType);
COMPARE_NODE_FIELD(relation);
COMPARE_NODE_FIELD(object);
COMPARE_NODE_FIELD(objarg);
***************
*** 1438,1443 **** _equalViewStmt(const ViewStmt *a, const ViewStmt *b)
--- 1439,1445 ----
COMPARE_NODE_FIELD(aliases);
COMPARE_NODE_FIELD(query);
COMPARE_SCALAR_FIELD(replace);
+ COMPARE_NODE_FIELD(options);
return true;
}
***************
*** 1945,1951 **** static bool
_equalReassignOwnedStmt(const ReassignOwnedStmt *a, const ReassignOwnedStmt *b)
{
COMPARE_NODE_FIELD(roles);
! COMPARE_NODE_FIELD(newrole);
return true;
}
--- 1947,1953 ----
_equalReassignOwnedStmt(const ReassignOwnedStmt *a, const ReassignOwnedStmt *b)
{
COMPARE_NODE_FIELD(roles);
! COMPARE_STRING_FIELD(newrole);
return true;
}
***************
*** 2182,2187 **** _equalColumnDef(const ColumnDef *a, const ColumnDef *b)
--- 2184,2190 ----
COMPARE_NODE_FIELD(collClause);
COMPARE_SCALAR_FIELD(collOid);
COMPARE_NODE_FIELD(constraints);
+ COMPARE_NODE_FIELD(fdwoptions);
return true;
}
diff --git a/src/backend/nodes/outfunindex 594b3fd..f713773 100644
*** a/src/backend/nodes/outfuncs.c
--- b/src/backend/nodes/outfuncs.c
***************
*** 1927,1937 **** _outPlannerParamItem(StringInfo str, const PlannerParamItem *node)
*
*****************************************************************************/
static void
! _outCreateStmt(StringInfo str, const CreateStmt *node)
{
- WRITE_NODE_TYPE("CREATESTMT");
-
WRITE_NODE_FIELD(relation);
WRITE_NODE_FIELD(tableElts);
WRITE_NODE_FIELD(inhRelations);
--- 1927,1938 ----
*
*****************************************************************************/
+ /*
+ * print the basic stuff of all nodes that inherit from CreateStmt
+ */
static void
! _outCreateStmtInfo(StringInfo str, const CreateStmt *node)
{
WRITE_NODE_FIELD(relation);
WRITE_NODE_FIELD(tableElts);
WRITE_NODE_FIELD(inhRelations);
***************
*** 1944,1954 **** _outCreateStmt(StringInfo str, const CreateStmt *node)
}
static void
_outCreateForeignTableStmt(StringInfo str, const CreateForeignTableStmt *node)
{
WRITE_NODE_TYPE("CREATEFOREIGNTABLESTMT");
! _outCreateStmt(str, (const CreateStmt *) &node->base);
WRITE_STRING_FIELD(servername);
WRITE_NODE_FIELD(options);
--- 1945,1963 ----
}
static void
+ _outCreateStmt(StringInfo str, const CreateStmt *node)
+ {
+ WRITE_NODE_TYPE("CREATESTMT");
+
+ _outCreateStmtInfo(str, (const CreateStmt *) node);
+ }
+
+ static void
_outCreateForeignTableStmt(StringInfo str, const CreateForeignTableStmt *node)
{
WRITE_NODE_TYPE("CREATEFOREIGNTABLESTMT");
! _outCreateStmtInfo(str, (const CreateStmt *) node);
WRITE_STRING_FIELD(servername);
WRITE_NODE_FIELD(options);
***************
*** 2088,2094 **** _outColumnDef(StringInfo str, const ColumnDef *node)
WRITE_BOOL_FIELD(is_local);
WRITE_BOOL_FIELD(is_not_null);
WRITE_BOOL_FIELD(is_from_type);
! WRITE_INT_FIELD(storage);
WRITE_NODE_FIELD(raw_default);
WRITE_NODE_FIELD(cooked_default);
WRITE_NODE_FIELD(collClause);
--- 2097,2103 ----
WRITE_BOOL_FIELD(is_local);
WRITE_BOOL_FIELD(is_not_null);
WRITE_BOOL_FIELD(is_from_type);
! WRITE_CHAR_FIELD(storage);
WRITE_NODE_FIELD(raw_default);
WRITE_NODE_FIELD(cooked_default);
WRITE_NODE_FIELD(collClause);