aboutsummaryrefslogtreecommitdiff
path: root/src/backend/tcop/utility.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/tcop/utility.c')
-rw-r--r--src/backend/tcop/utility.c30
1 files changed, 17 insertions, 13 deletions
diff --git a/src/backend/tcop/utility.c b/src/backend/tcop/utility.c
index 6d269865e7e..daf532693c2 100644
--- a/src/backend/tcop/utility.c
+++ b/src/backend/tcop/utility.c
@@ -818,7 +818,7 @@ standard_ProcessUtility(Node *parsetree,
context, params,
dest, completionTag);
else
- ExecAlterObjectSchemaStmt(stmt);
+ ExecAlterObjectSchemaStmt(stmt, NULL);
}
break;
@@ -886,6 +886,7 @@ ProcessUtilitySlow(Node *parsetree,
bool isTopLevel = (context == PROCESS_UTILITY_TOPLEVEL);
bool isCompleteQuery = (context <= PROCESS_UTILITY_QUERY);
bool needCleanup;
+ ObjectAddress address;
/* All event trigger calls are done only when isCompleteQuery is true */
needCleanup = isCompleteQuery && EventTriggerBeginCompleteQuery();
@@ -911,7 +912,6 @@ ProcessUtilitySlow(Node *parsetree,
{
List *stmts;
ListCell *l;
- Oid relOid;
/* Run parse analysis ... */
stmts = transformCreateStmt((CreateStmt *) parsetree,
@@ -928,9 +928,9 @@ ProcessUtilitySlow(Node *parsetree,
static char *validnsps[] = HEAP_RELOPT_NAMESPACES;
/* Create the table itself */
- relOid = DefineRelation((CreateStmt *) stmt,
- RELKIND_RELATION,
- InvalidOid);
+ address = DefineRelation((CreateStmt *) stmt,
+ RELKIND_RELATION,
+ InvalidOid, NULL);
/*
* Let NewRelationCreateToastTable decide if this
@@ -952,16 +952,17 @@ ProcessUtilitySlow(Node *parsetree,
toast_options,
true);
- NewRelationCreateToastTable(relOid, toast_options);
+ NewRelationCreateToastTable(address.objectId,
+ toast_options);
}
else if (IsA(stmt, CreateForeignTableStmt))
{
/* Create the table itself */
- relOid = DefineRelation((CreateStmt *) stmt,
- RELKIND_FOREIGN_TABLE,
- InvalidOid);
+ address = DefineRelation((CreateStmt *) stmt,
+ RELKIND_FOREIGN_TABLE,
+ InvalidOid, NULL);
CreateForeignTable((CreateForeignTableStmt *) stmt,
- relOid);
+ address.objectId);
}
else
{
@@ -1067,7 +1068,8 @@ ProcessUtilitySlow(Node *parsetree,
break;
case 'C': /* ADD CONSTRAINT */
AlterDomainAddConstraint(stmt->typeName,
- stmt->def);
+ stmt->def,
+ NULL);
break;
case 'X': /* DROP CONSTRAINT */
AlterDomainDropConstraint(stmt->typeName,
@@ -1190,7 +1192,8 @@ ProcessUtilitySlow(Node *parsetree,
break;
case T_AlterExtensionContentsStmt:
- ExecAlterExtensionContentsStmt((AlterExtensionContentsStmt *) parsetree);
+ ExecAlterExtensionContentsStmt((AlterExtensionContentsStmt *) parsetree,
+ NULL);
break;
case T_CreateFdwStmt:
@@ -1334,7 +1337,8 @@ ProcessUtilitySlow(Node *parsetree,
break;
case T_AlterObjectSchemaStmt:
- ExecAlterObjectSchemaStmt((AlterObjectSchemaStmt *) parsetree);
+ ExecAlterObjectSchemaStmt((AlterObjectSchemaStmt *) parsetree,
+ NULL);
break;
case T_AlterOwnerStmt: