* a pass determined by subcommand type.
*/
+#define AT_PASS_UNSET -1 /* UNSET will cause ERROR */
#define AT_PASS_DROP 0 /* DROP (all flavors) */
#define AT_PASS_ALTER_TYPE 1 /* ALTER COLUMN TYPE */
#define AT_PASS_OLD_INDEX 2 /* re-add existing indexes */
bool recurse, bool recursing, LOCKMODE lockmode)
{
AlteredTableInfo *tab;
- int pass;
+ int pass = AT_PASS_UNSET;
/* Find or create work queue entry for this table */
tab = ATGetQueueEntry(wqueue, rel);
default: /* oops */
elog(ERROR, "unrecognized alter table type: %d",
(int) cmd->subtype);
- pass = 0; /* keep compiler quiet */
+ pass = AT_PASS_UNSET; /* keep compiler quiet */
break;
}
+ Assert(pass > AT_PASS_UNSET);
/* Add the subcommand to the appropriate list for phase 2 */
tab->subcmds[pass] = lappend(tab->subcmds[pass], cmd);