Re: Feature discussion: Should syntax errors abort a transaction?

Поиск
Список
Период
Сортировка
От Edson Richter
Тема Re: Feature discussion: Should syntax errors abort a transaction?
Дата
Msg-id BLU0-SMTP61666259B69FDDAA7AA48FCFFF0@phx.gbl
обсуждение исходный текст
Ответы Re: Feature discussion: Should syntax errors abort a transaction?  (Scott Marlowe <scott.marlowe@gmail.com>)
Список pgsql-general
And I will be pleased that data is gone! I really did not expect anything but this.
If I need such tolerant behavior, then this shall be a feature of my special app, not a feature of the database... If
thedeveloper does not know how to write sql, then is time to learn. If the problem is the dynamic generated Sql, then I
mustwrite more test cases to cover these new scenarios. But IMHO, database must fail always (syntax or not...). 

Regards,

Edson

Scott Marlowe <scott.marlowe@gmail.com> escreveu:

>On Tue, Jun 19, 2012 at 8:50 AM, Edson Richter <edsonrichter@hotmail.com> wrote:
>> There is also the case of dynamically generated sql statements based on user selection... being syntax or not, I
wouldnever want half job done. Thia is the purpose of transactions: or all or nothing... 
>
>This this this, and again, this.  Imagine:
>
>begin;
>insert into tableb selcet * from tableb;
>truncate tableb;
>commit;
>
>What should happen when we get to the error on the second line?  Keep
>going?  Boom, data gone because of a syntax error.
>

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

Предыдущее
От: McKay
Дата:
Сообщение: Re: bytea insert difference between 8.3 and 9.x
Следующее
От: Martín Marqués
Дата:
Сообщение: Special ORDER BY