Re: Error on failed COMMIT

Поиск
Список
Период
Сортировка
От Vladimir Sitnikov
Тема Re: Error on failed COMMIT
Дата
Msg-id CAB=Je-EX8T2jmPS7J9PFcirXAP+XuvaEsRfKrtS-WxMx43OCKA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Error on failed COMMIT  (Laurenz Albe <laurenz.albe@cybertec.at>)
Ответы Re: Error on failed COMMIT
Список pgsql-hackers
Just one more data point: drivers do allow users to execute queries in a free form.
Shat is the user might execute /*comment*/commit/*comment*/ as a free-form SQL, and they would expect that the resulting
 behaviour should be exactly the same as .commit() API call (==silent rollback is converted to an exception).

That is drivers can add extra logic into .commit() API implementation, however, turning free-form SQL into exceptions
is hard to do consistently from the driver side.
It is not like "check the response from .commit() result".
It is more like "don't forget to parse user-provided SQL and verify if it is semantically equivalent to commit"

Pushing full SQL parser to the driver is not the best idea taking into the account the extensibility the core has.

Vladimir

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

Предыдущее
От: Julien Rouhaud
Дата:
Сообщение: Re: Allow auto_explain to log plans before queries are executed
Следующее
От: ilmari@ilmari.org (Dagfinn Ilmari Mannsåker)
Дата:
Сообщение: Re: [PATCH] pg_upgrade: report the reason for failing to open the cluster version file