pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: postgresql@zr40.nl
To: pgsql-bugs@postgresql.org
Subject: BUG #13674: psql: \i from a script run through \e misparses SQL as \i arguments
Date: Mon, 12 Oct 2015 17:47:31 +0000
Message-ID: <20151012174731.2778.64527@wrigleys.postgresql.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

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



view thread (2+ messages)  latest in thread

Message-ID: <20151012174731.2778.64527@wrigleys.postgresql.org>
Permalink:  ../20151012174731.2778.64527@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/20151012174731.2778.64527@wrigleys.postgresql.org

 · 

reply

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: postgresql@zr40.nl
  Subject: Re: BUG #13674: psql: \i from a script run through \e misparses SQL as \i arguments
  In-Reply-To: <20151012174731.2778.64527@wrigleys.postgresql.org>
  References: <20151012174731.2778.64527@wrigleys.postgresql.org>

* 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