Re: [PATCH] Alter or rename enum value

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: [PATCH] Alter or rename enum value
Дата
Msg-id CA+Tgmoaz9OSD1Zbf4kMfEDV8OMGM6x2=kWxAxd1XPCfTWW1f8Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [PATCH] Alter or rename enum value  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [PATCH] Alter or rename enum value  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
On Mon, Sep 5, 2016 at 11:40 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> The opportunity cost here is potential user confusion.  The only
> closely parallel rename operation we have is ALTER TABLE RENAME COLUMN,
> and that doesn't have a column-level IF EXISTS option; it has a
> table-level IF EXISTS option.  So I think it would be weird and confusing
> for ALTER TYPE RENAME VALUE to be different from that.  And again, it's
> hard to get excited about having these options for RENAME VALUE when no
> one has felt a need for them yet in RENAME COLUMN.  I'm especially dubious
> about IF NOT EXISTS against the destination name, considering that there
> isn't *any* variant of RENAME that has an equivalent of that.  If it's
> really useful, why hasn't that happened?

Because Tom Lane keeps voting against every patch to expand IF [ NOT ]
EXISTS into a new area?  :-)

We do have ALTER TABLE [ IF EXISTS ] .. ADD COLUMN [ IF NOT EXISTS ],
so if somebody wanted the [ IF NOT EXISTS ] clause to also apply to
the RENAME COLUMN case, they'd have a good argument for adding it.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



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

Предыдущее
От: Claudio Freire
Дата:
Сообщение: Re: Vacuum: allow usage of more than 1GB of work mem
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Vacuum: allow usage of more than 1GB of work mem