1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-19 04:21:08 +03:00

Fix ADD IF NOT EXISTS used in conjunction with ALTER TABLE ONLY

The flag for IF NOT EXISTS was only being passed down in the normal
recursing case. It's been this way since originally added in 9.6 in
commit 2cd40adb85 so backpatch back to 9.6.
This commit is contained in:
Greg Stark
2018-12-19 18:28:35 -05:00
parent 2ece7c07dc
commit 1075dfdaf3
3 changed files with 11 additions and 1 deletions

View File

@ -4054,7 +4054,7 @@ ATExecCmd(List **wqueue, AlteredTableInfo *tab, Relation rel,
case AT_AddColumnToView: /* add column via CREATE OR REPLACE VIEW */
address = ATExecAddColumn(wqueue, tab, rel, (ColumnDef *) cmd->def,
false, false,
false, lockmode);
cmd->missing_ok, lockmode);
break;
case AT_AddColumnRecurse:
address = ATExecAddColumn(wqueue, tab, rel, (ColumnDef *) cmd->def,