aboutsummaryrefslogtreecommitdiff
path: root/src/backend/nodes/copyfuncs.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/nodes/copyfuncs.c')
-rw-r--r--src/backend/nodes/copyfuncs.c154
1 files changed, 153 insertions, 1 deletions
diff --git a/src/backend/nodes/copyfuncs.c b/src/backend/nodes/copyfuncs.c
index 6a0c3374ce8..86f555a03a6 100644
--- a/src/backend/nodes/copyfuncs.c
+++ b/src/backend/nodes/copyfuncs.c
@@ -15,7 +15,7 @@
* Portions Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
- * $PostgreSQL: pgsql/src/backend/nodes/copyfuncs.c,v 1.415 2008/12/04 17:51:26 petere Exp $
+ * $PostgreSQL: pgsql/src/backend/nodes/copyfuncs.c,v 1.416 2008/12/19 16:25:17 petere Exp $
*
*-------------------------------------------------------------------------
*/
@@ -2033,6 +2033,17 @@ _copyDefElem(DefElem *from)
return newnode;
}
+static OptionDefElem *
+_copyOptionDefElem(OptionDefElem *from)
+{
+ OptionDefElem *newnode = makeNode(OptionDefElem);
+
+ COPY_SCALAR_FIELD(alter_op);
+ COPY_NODE_FIELD(def);
+
+ return newnode;
+}
+
static LockingClause *
_copyLockingClause(LockingClause *from)
{
@@ -2869,6 +2880,117 @@ _copyDropTableSpaceStmt(DropTableSpaceStmt *from)
return newnode;
}
+static CreateFdwStmt *
+_copyCreateFdwStmt(CreateFdwStmt *from)
+{
+ CreateFdwStmt *newnode = makeNode(CreateFdwStmt);
+
+ COPY_STRING_FIELD(fdwname);
+ COPY_STRING_FIELD(library);
+ COPY_NODE_FIELD(options);
+
+ return newnode;
+}
+
+static AlterFdwStmt *
+_copyAlterFdwStmt(AlterFdwStmt *from)
+{
+ AlterFdwStmt *newnode = makeNode(AlterFdwStmt);
+
+ COPY_STRING_FIELD(fdwname);
+ COPY_STRING_FIELD(library);
+ COPY_NODE_FIELD(options);
+
+ return newnode;
+}
+
+static DropFdwStmt *
+_copyDropFdwStmt(DropFdwStmt *from)
+{
+ DropFdwStmt *newnode = makeNode(DropFdwStmt);
+
+ COPY_STRING_FIELD(fdwname);
+ COPY_SCALAR_FIELD(missing_ok);
+ COPY_SCALAR_FIELD(behavior);
+
+ return newnode;
+}
+
+static CreateForeignServerStmt *
+_copyCreateForeignServerStmt(CreateForeignServerStmt *from)
+{
+ CreateForeignServerStmt *newnode = makeNode(CreateForeignServerStmt);
+
+ COPY_STRING_FIELD(servername);
+ COPY_STRING_FIELD(servertype);
+ COPY_STRING_FIELD(version);
+ COPY_STRING_FIELD(fdwname);
+ COPY_NODE_FIELD(options);
+
+ return newnode;
+}
+
+static AlterForeignServerStmt *
+_copyAlterForeignServerStmt(AlterForeignServerStmt *from)
+{
+ AlterForeignServerStmt *newnode = makeNode(AlterForeignServerStmt);
+
+ COPY_STRING_FIELD(servername);
+ COPY_STRING_FIELD(version);
+ COPY_NODE_FIELD(options);
+ COPY_SCALAR_FIELD(has_version);
+
+ return newnode;
+}
+
+static DropForeignServerStmt *
+_copyDropForeignServerStmt(DropForeignServerStmt *from)
+{
+ DropForeignServerStmt *newnode = makeNode(DropForeignServerStmt);
+
+ COPY_STRING_FIELD(servername);
+ COPY_SCALAR_FIELD(missing_ok);
+ COPY_SCALAR_FIELD(behavior);
+
+ return newnode;
+}
+
+static CreateUserMappingStmt *
+_copyCreateUserMappingStmt(CreateUserMappingStmt *from)
+{
+ CreateUserMappingStmt *newnode = makeNode(CreateUserMappingStmt);
+
+ COPY_STRING_FIELD(username);
+ COPY_STRING_FIELD(servername);
+ COPY_NODE_FIELD(options);
+
+ return newnode;
+}
+
+static AlterUserMappingStmt *
+_copyAlterUserMappingStmt(AlterUserMappingStmt *from)
+{
+ AlterUserMappingStmt *newnode = makeNode(AlterUserMappingStmt);
+
+ COPY_STRING_FIELD(username);
+ COPY_STRING_FIELD(servername);
+ COPY_NODE_FIELD(options);
+
+ return newnode;
+}
+
+static DropUserMappingStmt *
+_copyDropUserMappingStmt(DropUserMappingStmt *from)
+{
+ DropUserMappingStmt *newnode = makeNode(DropUserMappingStmt);
+
+ COPY_STRING_FIELD(username);
+ COPY_STRING_FIELD(servername);
+ COPY_SCALAR_FIELD(missing_ok);
+
+ return newnode;
+}
+
static CreateTrigStmt *
_copyCreateTrigStmt(CreateTrigStmt *from)
{
@@ -3696,6 +3818,33 @@ copyObject(void *from)
case T_DropTableSpaceStmt:
retval = _copyDropTableSpaceStmt(from);
break;
+ case T_CreateFdwStmt:
+ retval = _copyCreateFdwStmt(from);
+ break;
+ case T_AlterFdwStmt:
+ retval = _copyAlterFdwStmt(from);
+ break;
+ case T_DropFdwStmt:
+ retval = _copyDropFdwStmt(from);
+ break;
+ case T_CreateForeignServerStmt:
+ retval = _copyCreateForeignServerStmt(from);
+ break;
+ case T_AlterForeignServerStmt:
+ retval = _copyAlterForeignServerStmt(from);
+ break;
+ case T_DropForeignServerStmt:
+ retval = _copyDropForeignServerStmt(from);
+ break;
+ case T_CreateUserMappingStmt:
+ retval = _copyCreateUserMappingStmt(from);
+ break;
+ case T_AlterUserMappingStmt:
+ retval = _copyAlterUserMappingStmt(from);
+ break;
+ case T_DropUserMappingStmt:
+ retval = _copyDropUserMappingStmt(from);
+ break;
case T_CreateTrigStmt:
retval = _copyCreateTrigStmt(from);
break;
@@ -3823,6 +3972,9 @@ copyObject(void *from)
case T_DefElem:
retval = _copyDefElem(from);
break;
+ case T_OptionDefElem:
+ retval = _copyOptionDefElem(from);
+ break;
case T_LockingClause:
retval = _copyLockingClause(from);
break;