Re: A bad behavior under autocommit off mode
От | Tom Lane |
---|---|
Тема | Re: A bad behavior under autocommit off mode |
Дата | |
Msg-id | 20193.1048134646@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: A bad behavior under autocommit off mode (Hiroshi Inoue <Inoue@tpf.co.jp>) |
Ответы |
Re: A bad behavior under autocommit off mode
|
Список | pgsql-hackers |
Hiroshi Inoue <Inoue@tpf.co.jp> writes: > Bruce Momjian wrote: >> This patch removes that "stuff all queries into a single transaction" >> behavior and makes them function just like queries arriving separately. >> This does BREAK BACKWARD COMPATIBILITY. However, if they want the old >> behavior, they just need to wrap BEGIN/COMMIT around the query string. > Does the change worth the trouble ? > Please don't break BACKWARD COMPATIBILITY easily. I do not like this change either. It breaks long-established behavior simply to have an easy fix for a recently-introduced bug (and what's more, a bug in a feature that we may end up removing completely; I like Peter's idea that autocommit on the client side is a better approach). It would be a serious error to imagine that psql -c strings are the only case where this behavior applies. PQexec and interfaces based on it exhibit the same behavior. The behavior is actually useful for pipelining (send several queries in one PQsendQuery, read and process the results one at a time with PQgetResult; then the server's processing of the additional commands is overlapped with client-side processing of the results). So I believe there are applications out there depending on it. I think we should look for a fix that does not break compatibility. regards, tom lane
В списке pgsql-hackers по дате отправления: