Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Zlpu4-0007AU-7h for pgsql-bugs@arkaria.postgresql.org; Tue, 13 Oct 2015 03:05:28 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1Zlpu3-0004Fu-KA for pgsql-bugs@arkaria.postgresql.org; Tue, 13 Oct 2015 03:05:27 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1ZlhCg-0008Gj-A0 for pgsql-bugs@postgresql.org; Mon, 12 Oct 2015 17:48:06 +0000 Received: from wrigleys.postgresql.org ([204.145.124.246]) by magus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1ZlhCd-0005rR-UW for pgsql-bugs@postgresql.org; Mon, 12 Oct 2015 17:48:05 +0000 MIME-Version: 1.0 Subject: BUG #13674: psql: \i from a script run through \e misparses SQL as \i arguments To: pgsql-bugs@postgresql.org From: postgresql@zr40.nl Date: Mon, 12 Oct 2015 17:47:31 +0000 Message-ID: <20151012174731.2778.64527@wrigleys.postgresql.org> X-Pg-Spam-Score: -1.1 (-) Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org The following bug has been logged on the website: Bug reference: 13674 Logged by: Matthijs van der Vleuten Email address: postgresql@zr40.nl PostgreSQL version: 9.4.5 Operating system: Mac OS X Description: Reproduction: 1. Create file a.sql with the following contents: BEGIN; \i b.sql ROLLBACK; 2. Create an empty file b.sql (smallest reproduction; bug also occurs with non-empty files) 3. In psql, execute: \e a.sql 4. In $EDITOR, save and exit Actual output: ~/test % psql -Xe psql (9.4.5) Type "help" for help. zr40=# \e foo2.sql BEGIN; BEGIN \i: extra argument "ROLLBACK;" ignored zr40=# Expected output: ~/test % psql -Xe psql (9.4.5) Type "help" for help. zr40=# \e foo2.sql BEGIN; BEGIN ROLLBACK; ROLLBACK zr40=# -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs