Re: Rollback on include error in psql
От | Adrian Klaver |
---|---|
Тема | Re: Rollback on include error in psql |
Дата | |
Msg-id | 54A1ED2C.2070701@aklaver.com обсуждение исходный текст |
Ответ на | Re: Rollback on include error in psql (David Johnston <david.g.johnston@gmail.com>) |
Ответы |
Re: Rollback on include error in psql
|
Список | pgsql-general |
On 12/29/2014 03:56 PM, David Johnston wrote: > > > > > So you think psql should issue "COMMIT;" even if it is exiting due to > "ON_ERROR_STOP"? I say yes, if it is a non-SQL error. As Viktor stated, SQL errors abort the transaction. > > Whether you do or don't can you show me where in the documentation the > current behavior is described? Your biggest issue seems to be with --single-transaction and ON_ERROR_STOP so: --single-transaction When psql executes a script, adding this option wraps BEGIN/COMMIT around the script to execute it as a single transaction. Therefore: BEGIN; script COMMIT; I would and have agreed with your previous statements that it is not clear enough that \i is not an SQL command and an error with same is ignored by the transaction. Outside of that I see no problem. > > David J. > -- Adrian Klaver adrian.klaver@aklaver.com
В списке pgsql-general по дате отправления: