Conditional ALTER TABLE

Поиск
Список
Период
Сортировка
От Dale Seaburg
Тема Conditional ALTER TABLE
Дата
Msg-id E6A569AE-7056-4CD9-9CF3-C85FDC1AA2AC@verizon.net
обсуждение исходный текст
Ответы Re: Conditional ALTER TABLE  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-novice
Is there a way to make a conditional ALTER TABLE command?

If I want to drop a column only if that table's column exists, what
would be the correct syntax.  I have tried several IF EXISTS, but I
get an error at "IF".  I would like to use the Query tool in pgAdmin
III, if possible.  But, if push comes to shove, I'll resort to psql.

As an alternative, how best to tell SQL (Query tool) to continue
processing a script even if an "error" (like no column exists) is
encountered.

Thanks,

Dale

В списке pgsql-novice по дате отправления:

Предыдущее
От: Ron Arts
Дата:
Сообщение: Re: I don't understand this explain output
Следующее
От: Tom Lane
Дата:
Сообщение: Re: Conditional ALTER TABLE