Search Postgresql Archives

Re: psql swallowed my "BEGIN;" on reset... user beware?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Sep 30, 2013 at 10:49 AM, Moshe Jacobson <moshe@xxxxxxxxxxxx> wrote:
>
> On Sun, Sep 29, 2013 at 2:18 AM, Ken Tanzer <ken.tanzer@xxxxxxxxx> wrote:
>>
>> After restarting the server in another window, I was surprised that my
>> command did not run in a transaction:
>>
>> spc_test_scratch=# BEGIN; DROP VIEW IF EXISTS ptest_mip ; DROP VIEW
>> rent_info; \i create.view.rent_info.sql
>> FATAL:  terminating connection due to administrator command
>> server closed the connection unexpectedly
>>         This probably means the server terminated abnormally
>>         before or while processing the request.
>> The connection to the server was lost. Attempting reset: Succeeded.
>> NOTICE:  view "ptest_mip" does not exist, skipping
>> DROP VIEW
>> DROP VIEW
>> CREATE VIEW
>> spc_test_scratch=# commit;
>> WARNING:  there is no transaction in progress
>> COMMIT
>
>
> This seems like a pretty serious issue. My opinion is that psql should
> refuse to execute further commands on a line of input if any of them fails
> due to a terminated connection.

you can control this with on error stop directive -- add it to your
psqlrc if you want the setting to persist.

merlin


-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux