Re: BUG #7635: psql -1 and \connect - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #7635: psql -1 and \connect
Date
Msg-id 7960.1351805390@sss.pgh.pa.us
Whole thread Raw
In response to BUG #7635: psql -1 and \connect  (pgmail@joh.to)
Responses Re: BUG #7635: psql -1 and \connect
List pgsql-bugs
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.

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.

            regards, tom lane

pgsql-bugs by date:

Previous
From: Tom Lane
Date:
Subject: Re: BUG #7634: Missing files in global/ after a lot of CREATE DATABASE / DROP DATABASE
Next
From: "Marko Tiikkaja"
Date:
Subject: Re: BUG #7635: psql -1 and \connect