Re: Ticket 269: Add support for 9.1 ALTER TYPE new syntax for enum

Поиск
Список
Период
Сортировка
От Dave Page
Тема Re: Ticket 269: Add support for 9.1 ALTER TYPE new syntax for enum
Дата
Msg-id AANLkTinG3_mDJBeaYVgrQCEe_NwFj1K574B62-QHPiDO@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Ticket 269: Add support for 9.1 ALTER TYPE new syntax for enum  (Guillaume Lelarge <guillaume@lelarge.info>)
Ответы Re: Ticket 269: Add support for 9.1 ALTER TYPE new syntax for enum
Список pgadmin-hackers
On Sat, Oct 30, 2010 at 4:07 PM, Guillaume Lelarge
<guillaume@lelarge.info> wrote:
> Le 29/10/2010 21:56, Guillaume Lelarge a écrit :
>> Le 29/10/2010 21:11, Guillaume Lelarge a écrit :
>>> [...]
>>> This patch adds support to the new ALTER TYPE syntax in 9.1 for enums.
>>>
>>> It's working great except one thing. If a user wants to add two labels,
>>> we're screwed because we can't do two "ALTER TYPE ... ADD" statements in
>>> the same query execution. Any idea how to solve this? the only way I
>>> found would be to disallow adding two labels at once but it results on a
>>> less interesting feature.
>>>
>>
>> So I was wrong. The issue is that we can't issue this statement in a
>> explicit transaction. Any idea how to solve the "don't send begin/end
>> statements"?
>>
>
> The only idea I have is to make dlgType a two-SQL-boxes dialog and
> modify the dlgProperty::apply() method so that if there is "ALTER TYPE
> ... ADD {BEFORE | AFTER}" statements, they get splitted and fired
> individualy. I didn't yet write the code to split the statement, but it
> will surely be ugly.
>
> Any objection on doing this? or better idea to fix this issue?

I don't understand why we can't do all this at once - what's the
problem exactly? Normally we only split statements when they're not
atomic and cannot be rolled back.

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

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

Предыдущее
От: Guillaume Lelarge
Дата:
Сообщение: Re: Ticket 269: Add support for 9.1 ALTER TYPE new syntax for enum
Следующее
От: Guillaume Lelarge
Дата:
Сообщение: Re: Ticket 269: Add support for 9.1 ALTER TYPE new syntax for enum