Re: It looks like transaction, but it isn't transaction

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: It looks like transaction, but it isn't transaction
Дата
Msg-id 25585.1251336356@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: It looks like transaction, but it isn't transaction  (Sergey Samokhin <prikrutil@gmail.com>)
Ответы Re: It looks like transaction, but it isn't transaction
Список pgsql-general
Sergey Samokhin <prikrutil@gmail.com> writes:
> I should rejig my question: is this normal for a query made up from
> several commands to be completely discarded if an error occurs?

Yes, if it's submitted as a single Query message, that's what happens.
Also, the implicit transaction is around the whole Query message not
just single SQL statements, which probably explains your confusion
on other points.

There's been some discussion of disallowing multiple statements per
Query, partially to avoid these sorts of corner cases and partially
as a defense against SQL-injection attacks.  But so far the conclusion
has been that it would break a lot of code while not buying much.

            regards, tom lane

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

Предыдущее
От: Sergey Samokhin
Дата:
Сообщение: Re: It looks like transaction, but it isn't transaction
Следующее
От: Craig Ringer
Дата:
Сообщение: Re: PG 8.2 instal on Win2k3 - unable to connect to test network socket