Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 7 additions & 43 deletions src/backend/tcop/utility.c
Original file line number Diff line number Diff line change
Expand Up @@ -1320,11 +1320,8 @@ ProcessUtilitySlow(ParseState *pstate,
{
List *stmts;
ListCell *l;
<<<<<<< HEAD
List *more_stmts = NIL;
=======
RangeVar *table_rv = NULL;
>>>>>>> f81e97d0475cd4bc597adc23b665bd84fbf79a0d

/* Run parse analysis ... */
/*
Expand All @@ -1350,7 +1347,6 @@ ProcessUtilitySlow(ParseState *pstate,
if (IsA(stmt, CreateStmt))
{
CreateStmt *cstmt = (CreateStmt *) stmt;
<<<<<<< HEAD
char relKind = RELKIND_RELATION;
Datum toast_options;
static char *validnsps[] = HEAP_RELOPT_NAMESPACES;
Expand All @@ -1368,15 +1364,18 @@ ProcessUtilitySlow(ParseState *pstate,
else
cstmt->relKind = relKind;

/* Remember transformed RangeVar for LIKE */
table_rv = cstmt->relation;

/*
* GPDB: Don't dispatch it yet, as we haven't
* created the toast and other auxiliary tables
* yet.
*/
/* Create the table itself */
address = DefineRelation((CreateStmt *) stmt,
address = DefineRelation(cstmt,
relKind,
((CreateStmt *) stmt)->ownerid, NULL,
cstmt->ownerid, NULL,
queryString, false, true,
cstmt->intoPolicy);

Expand Down Expand Up @@ -1404,19 +1403,6 @@ ProcessUtilitySlow(ParseState *pstate,
more_stmts = list_concat(more_stmts, parts);
}

=======
Datum toast_options;
static char *validnsps[] = HEAP_RELOPT_NAMESPACES;

/* Remember transformed RangeVar for LIKE */
table_rv = cstmt->relation;

/* Create the table itself */
address = DefineRelation(cstmt,
RELKIND_RELATION,
InvalidOid, NULL,
queryString);
>>>>>>> f81e97d0475cd4bc597adc23b665bd84fbf79a0d
EventTriggerCollectSimpleCommand(address,
secondaryObject,
stmt);
Expand All @@ -1427,37 +1413,21 @@ ProcessUtilitySlow(ParseState *pstate,
*/
CommandCounterIncrement();

<<<<<<< HEAD
if (relKind != RELKIND_COMPOSITE_TYPE)
{
/*
* parse and validate reloptions for the toast
* table
*/
toast_options = transformRelOptions((Datum) 0,
((CreateStmt *) stmt)->options,
cstmt->options,
"toast",
validnsps,
true,
false);
(void) heap_reloptions(RELKIND_TOASTVALUE,
toast_options,
true);
=======
/*
* parse and validate reloptions for the toast
* table
*/
toast_options = transformRelOptions((Datum) 0,
cstmt->options,
"toast",
validnsps,
true,
false);
(void) heap_reloptions(RELKIND_TOASTVALUE,
toast_options,
true);
>>>>>>> f81e97d0475cd4bc597adc23b665bd84fbf79a0d

NewRelationCreateToastTable(address.objectId,
toast_options);
Expand Down Expand Up @@ -1502,19 +1472,13 @@ ProcessUtilitySlow(ParseState *pstate,
address = DefineRelation(&cstmt->base,
RELKIND_FOREIGN_TABLE,
InvalidOid, NULL,
<<<<<<< HEAD
queryString,
true,
true,
NULL);
CreateForeignTable((CreateForeignTableStmt *) stmt,
CreateForeignTable(cstmt,
address.objectId,
false /* skip_permission_checks */);
=======
queryString);
CreateForeignTable(cstmt,
address.objectId);
>>>>>>> f81e97d0475cd4bc597adc23b665bd84fbf79a0d
EventTriggerCollectSimpleCommand(address,
secondaryObject,
stmt);
Expand Down