Re: auto-reconnect: temp schemas, sequences, transactions - Mailing list pgsql-general

From Tom Lane
Subject Re: auto-reconnect: temp schemas, sequences, transactions
Date
Msg-id 12545.1304525056@sss.pgh.pa.us
Whole thread Raw
In response to Re: auto-reconnect: temp schemas, sequences, transactions  (Marek Więckowski <wieckom@foxi.nl>)
Responses Re: auto-reconnect: temp schemas, sequences, transactions
List pgsql-general
Marek =?utf-8?q?Wi=C4=99ckowski?= <wieckom@foxi.nl> writes:
> If there is a script executed in psql there is no easy way to catch that psql
> has reconnected in the middle of it...

As far as psql goes, it should certainly abandon executing any script
file if it loses the connection.  I rather thought it did already.
See the bit just above where you propose patching:

        if (!pset.cur_cmd_interactive)
        {
            psql_error("connection to server was lost\n");
            exit(EXIT_BADCONN);
        }


            regards, tom lane

pgsql-general by date:

Previous
From: Michael Graham
Date:
Subject: Re: Rearranging simple where clauses
Next
From: Marek Więckowski
Date:
Subject: Re: auto-reconnect: temp schemas, sequences, transactions