Re: ALTER TYPE ... ADD VALUE issue

Поиск
Список
Период
Сортировка
От David G Johnston
Тема Re: ALTER TYPE ... ADD VALUE issue
Дата
Msg-id 1413836892168-5823725.post@n5.nabble.com
обсуждение исходный текст
Ответ на Re: ALTER TYPE ... ADD VALUE issue  (Adrian Klaver <adrian.klaver@aklaver.com>)
Список pgsql-general
Adrian Klaver-4 wrote
> On 10/20/2014 12:03 PM, Tom Lane wrote:
>> Victor Yegorov <

> vyegorov@

> > writes:
>>> 2014-10-20 21:43 GMT+03:00 Adrian Klaver <

> adrian.klaver@

> >:
>>>> With \set AUTOCOMMIT off the COMMIT ended one transaction block and
>>>> started another.
>>
>>> I don't think `COMMIT` starts a new transaction block here,
>>> as I can run `VACUUM` after it, and vacuum also cannot be run inside
>>> transaction block.
>>
>> psql knows not to issue BEGIN before a VACUUM command.  It doesn't
>> know that about ALTER TYPE ... ADD VALUE.
>
> http://www.postgresql.org/docs/9.3/interactive/app-psql.html#APP-PSQL-VARIABLES
>
> AUTOCOMMIT
>
> The autocommit-off mode works by issuing an implicit BEGIN for you, just
> before any command that is not already in a transaction block and is not
> itself a BEGIN or other transaction-control command, nor a command that
> cannot be executed inside a transaction block (such as VACUUM).
>
> The above would seem to imply it should work, in contrast to what I
> originally said.

This complaint already exists as a bug report:

http://www.postgresql.org/message-id/20140930104330.7639.71922@wrigleys.postgresql.org

I would concur that this is an oversight worth correcting going forward; and
I cannot see how it would hurt to back-patch if the fix is reasonably
non-invasive.

David J.




--
View this message in context: http://postgresql.1045698.n5.nabble.com/ALTER-TYPE-ADD-VALUE-issue-tp5823696p5823725.html
Sent from the PostgreSQL - general mailing list archive at Nabble.com.


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

Предыдущее
От: Adrian Klaver
Дата:
Сообщение: Re: ALTER TYPE ... ADD VALUE issue
Следующее
От: "Ilya I. Ashchepkov"
Дата:
Сообщение: Function runtime increases after 5 calls in the same session.