Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TTuZw-0004Zi-14 for pgsql-bugs@postgresql.org; Thu, 01 Nov 2012 13:13:00 +0000 Received: from mahout.postgresql.org ([98.129.198.123]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TTuZq-000185-L4 for pgsql-bugs@postgresql.org; Thu, 01 Nov 2012 13:12:59 +0000 Received: from [204.145.124.246] (helo=wrigleys.postgresql.org) by mahout.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TTuZp-0007pQ-Hr for pgsql-bugs@postgresql.org; Thu, 01 Nov 2012 13:12:54 +0000 Received: from www-data by wrigleys.postgresql.org with local (Exim 4.72) (envelope-from ) id 1TTuZp-00008O-4e for pgsql-bugs@postgresql.org; Thu, 01 Nov 2012 13:12:53 +0000 Date: Thu, 01 Nov 2012 13:12:53 +0000 Message-Id: Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Subject: BUG #7635: psql -1 and \connect To: pgsql-bugs@postgresql.org From: pgmail@joh.to X-Pg-Spam-Score: -2.6 (--) X-Archive-Number: 201211/6 X-Sequence-Number: 34564 The following bug has been logged on the website: Bug reference: 7635 Logged by: Marko Tiikkaja Email address: pgmail@joh.to PostgreSQL version: 9.1.6 Operating system: OSX something Description: = Hi, With a simple script like this: \connect postgres CREATE TABLE foo(); ERROR_HERE; You get output like this: You are now connected to database "postgres" as user "postgres". CREATE TABLE psql:singletxn.sql:3: ERROR: syntax error at or near "ERROR_HERE" LINE 1: ERROR_HERE; ^ psql:singletxn.sql:0: WARNING: there is no transaction in progress Which isn't really what I expected :-( 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.