Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TU2Kt-0006RX-0b for pgsql-bugs@postgresql.org; Thu, 01 Nov 2012 21:29:59 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TU2Kn-0000oG-JU for pgsql-bugs@postgresql.org; Thu, 01 Nov 2012 21:29:58 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.5/8.14.5) with ESMTP id qA1LToBV007961; Thu, 1 Nov 2012 17:29:50 -0400 (EDT) From: Tom Lane To: pgmail@joh.to cc: pgsql-bugs@postgresql.org Subject: Re: BUG #7635: psql -1 and \connect In-reply-to: References: Comments: In-reply-to pgmail@joh.to message dated "Thu, 01 Nov 2012 13:12:53 -0000" Date: Thu, 01 Nov 2012 17:29:50 -0400 Message-ID: <7960.1351805390@sss.pgh.pa.us> X-Pg-Spam-Score: -2.6 (--) X-Archive-Number: 201211/10 X-Sequence-Number: 34568 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