cur_pass, context);
Assert(cmd != NULL);
if (rel->rd_rel->relkind == RELKIND_PARTITIONED_TABLE)
- ATExecAttachPartition(wqueue, rel, (PartitionCmd *) cmd->def,
- context);
+ address = ATExecAttachPartition(wqueue, rel, (PartitionCmd *) cmd->def,
+ context);
else
- ATExecAttachPartitionIdx(wqueue, rel,
- ((PartitionCmd *) cmd->def)->name);
+ address = ATExecAttachPartitionIdx(wqueue, rel,
+ ((PartitionCmd *) cmd->def)->name);
break;
case AT_DetachPartition:
cmd = ATParseTransformCmd(wqueue, tab, rel, cmd, false, lockmode,
Assert(cmd != NULL);
/* ATPrepCmd ensures it must be a table */
Assert(rel->rd_rel->relkind == RELKIND_PARTITIONED_TABLE);
- ATExecDetachPartition(wqueue, tab, rel,
- ((PartitionCmd *) cmd->def)->name,
- ((PartitionCmd *) cmd->def)->concurrent);
+ address = ATExecDetachPartition(wqueue, tab, rel,
+ ((PartitionCmd *) cmd->def)->name,
+ ((PartitionCmd *) cmd->def)->concurrent);
break;
case AT_DetachPartitionFinalize:
- ATExecDetachPartitionFinalize(rel, ((PartitionCmd *) cmd->def)->name);
+ address = ATExecDetachPartitionFinalize(rel, ((PartitionCmd *) cmd->def)->name);
break;
default: /* oops */
elog(ERROR, "unrecognized alter table type: %d",
NOTICE: DDL test: type simple, tag CREATE TABLE
ALTER TABLE part ATTACH PARTITION part2 FOR VALUES FROM (101) to (200);
NOTICE: DDL test: type alter table, tag ALTER TABLE
-NOTICE: subcommand: type ATTACH PARTITION desc <NULL>
+NOTICE: subcommand: type ATTACH PARTITION desc table part2
ALTER TABLE part DETACH PARTITION part2;
NOTICE: DDL test: type alter table, tag ALTER TABLE
-NOTICE: subcommand: type DETACH PARTITION desc <NULL>
+NOTICE: subcommand: type DETACH PARTITION desc table part2
DROP TABLE part2;
ALTER TABLE part ADD PRIMARY KEY (a);
NOTICE: DDL test: type alter table, tag ALTER TABLE