Re: alter enum add value if not exists

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Re: alter enum add value if not exists
Дата
Msg-id CABUevExBqNKjvcH9CTLfMV5HkV5UuGyMwazc=Ss3ps0+6=8qgQ@mail.gmail.com
обсуждение исходный текст
Ответ на alter enum add value if not exists  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: alter enum add value if not exists
Список pgsql-hackers
On Mon, Aug 20, 2012 at 4:52 PM, Andrew Dunstan <andrew@dunslane.net> wrote:
> Here is a patch for this feature, which should alleviate some of the woes
> caused by adding labels not being transactional (and thus not allowing for
> the catching of errors).

I haven't actually checked the code in detail, but if it's not
transactional, how does it actually prevent race conditions? Doesn't
it at least have to do it's check *after* the enum is locked?

I don't recall the exact discussion, but was there something about
enum labels that made it impossible to make them transactional, or was
it just "lots of work, let's do that later instead" to get the feature
in? If the second, does anyone have plans to fix it? It is a quite
annoying limitation :(

That said, this functionality would be useful even *if* the enum label
addition was made transactional...

-- Magnus HaganderMe: http://www.hagander.net/Work: http://www.redpill-linpro.com/



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

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Re: pg_stat_replication vs StandbyReplyMessage
Следующее
От: Amit Kapila
Дата:
Сообщение: Re: to_timestamp() too loose?