1
0
mirror of https://github.com/postgres/postgres.git synced 2025-12-06 00:02:13 +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 4aad9813e8
commit 9e6cd794c2
3 changed files with 11 additions and 1 deletions

View File

@@ -3832,7 +3832,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,
false, lockmode);
cmd->missing_ok, lockmode);
break;
case AT_AddColumnRecurse:
address = ATExecAddColumn(wqueue, tab, rel, (ColumnDef *) cmd->def,