From: Marko Tiikkaja <pgmail@joh.to>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #7635: psql -1 and \connect
Date: Thu, 01 Nov 2012 23:05:57 +0100
Message-ID: <op.wm37n7a0ye4vw9@blue.lan> (raw)
In-Reply-To: <7960.1351805390@sss.pgh.pa.us>
References: <E1TTuZp-00008O-4e@wrigleys.postgresql.org>
<7960.1351805390@sss.pgh.pa.us>
On Thu, 01 Nov 2012 22:29:50 +0100, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> pgmail@joh.to writes:
>> I know it's not clear what to do with --single-transaction if a script
>> is
>> \connecting to multiple databases in a single file, but IMHO it should
>> at
>> least work correctly for the single database case.
>
> Define "correctly" --- I would expect \connect to establish a new
> connection even if the same target database is named. We can't change
> that behavior without breaking existing scripts, IMO --- for example, \c
> is a long-established way to reset GUC settings, prepared statements,
> etc.
Hmm.. I only considered the case where the \connect is at the beginning
of the file. I see your point.
> Perhaps we should have \connect fail outright in -1 mode. I can see
> no way for it to do anything and still maintain the expectation of a
> single transaction.
Would supporting a \connect at the very beginning of the file seem
possible? Maybe even only if it's to the same database?
Regards,
Marko Tiikkaja
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: pgmail@joh.to, tgl@sss.pgh.pa.us
Subject: Re: BUG #7635: psql -1 and \connect
In-Reply-To: <op.wm37n7a0ye4vw9@blue.lan>
References: <E1TTuZp-00008O-4e@wrigleys.postgresql.org> <7960.1351805390@sss.pgh.pa.us> <op.wm37n7a0ye4vw9@blue.lan>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox