Re: auto-reconnect: temp schemas, sequences, transactions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Marek Więckowski <wieckom(at)foxi(dot)nl>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: auto-reconnect: temp schemas, sequences, transactions
Date: 2011-05-04 16:04:16
Message-ID: 12545.1304525056@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Marek =?utf-8?q?Wi=C4=99ckowski?= <wieckom(at)foxi(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Marek Więckowski 2011-05-04 17:03:31 Re: auto-reconnect: temp schemas, sequences, transactions
Previous Message Michael Graham 2011-05-04 15:58:51 Re: Rearranging simple where clauses