Re: BUG #16988: Spurious "SET LOCAL can only be used in transaction blocks" warning using implicit transaction block

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #16988: Spurious "SET LOCAL can only be used in transaction blocks" warning using implicit transaction block
Дата
Msg-id 3493686.1619912155@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #16988: Spurious "SET LOCAL can only be used in transaction blocks" warning using implicit transaction block  (Brar Piening <brar@gmx.de>)
Ответы Re: BUG #16988: Spurious "SET LOCAL can only be used in transaction blocks" warning using implicit transaction block  (Brar Piening <brar@gmx.de>)
Список pgsql-bugs
Brar Piening <brar@gmx.de> writes:
> Tom Lane wrote:
>> PG Bug reporting form <noreply@postgresql.org> writes:
>>> I am using SET LOCAL in an Npgsql multi-statement command.

>> It seems that whatever Npgsql is doing at the wire protocol level
>> doesn't match this, but they'd have to explain what they are doing
>> for us to offer much help.

> At the wire protocol level npgsql sends this as two queries via the
> extended query protocol without a sync inbetween them.
> (Parse,Bind,Describe,Execute;Parse,Bind,Describe,Execute,Sync)

There is no implicit transaction block around the two commands in such
a case, so that explains why it doesn't act as Mike was hoping.

Omitting the Sync has zero effect on transactional semantics; it only
means that if the first command fails, we'll skip the second one.

            regards, tom lane



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

Предыдущее
От: Brar Piening
Дата:
Сообщение: Re: BUG #16988: Spurious "SET LOCAL can only be used in transaction blocks" warning using implicit transaction block
Следующее
От: Brar Piening
Дата:
Сообщение: Re: BUG #16988: Spurious "SET LOCAL can only be used in transaction blocks" warning using implicit transaction block