pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #13674: psql: \i from a script run through \e misparses SQL as \i arguments
2+ messages / 2 participants
[nested] [flat]
* BUG #13674: psql: \i from a script run through \e misparses SQL as \i arguments
@ 2015-10-12 17:47 postgresql@zr40.nl
0 siblings, 1 reply; 2+ messages in thread
From: postgresql@zr40.nl @ 2015-10-12 17:47 UTC (permalink / raw)
To: pgsql-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
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: BUG #13674: psql: \i from a script run through \e misparses SQL as \i arguments
@ 2015-10-13 04:21 David G. Johnston <david.g.johnston@gmail.com>
parent: postgresql@zr40.nl
0 siblings, 0 replies; 2+ messages in thread
From: David G. Johnston @ 2015-10-13 04:21 UTC (permalink / raw)
To: postgresql@zr40.nl <postgresql@zr40.nl>; +Cc: pgsql-bugs
On Monday, October 12, 2015, <postgresql@zr40.nl> wrote:
> The following bug has been logged on the website:
>
> Bug reference: 13674
> Logged by: Matthijs van der Vleuten
> Email address: postgresql@zr40.nl <javascript:;>
> 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=#
>
>
Working as documented. Namely the "...whole buffer as a single line."
part of \e. Hence the warning about not making scripts with this command.
David J.
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2015-10-13 04:21 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2015-10-12 17:47 BUG #13674: psql: \i from a script run through \e misparses SQL as \i arguments postgresql@zr40.nl
2015-10-13 04:21 ` David G. Johnston <david.g.johnston@gmail.com>
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