Re: unexpected psql "feature" - Mailing list pgsql-hackers

From David G. Johnston
Subject Re: unexpected psql "feature"
Date
Msg-id CAKFQuwaoorvwWMP8NpQf8j9TQCgrNsvvkvoXc-bKh71qu1gUJw@mail.gmail.com
Whole thread Raw
In response to unexpected psql "feature"  (Fabien COELHO <coelho@cri.ensmp.fr>)
Responses Re: unexpected psql "feature"  (Fabien COELHO <coelho@cri.ensmp.fr>)
List pgsql-hackers
On Wed, Jul 13, 2016 at 4:47 PM, Fabien COELHO <coelho@cri.ensmp.fr> wrote:

I would suggest that:
 - the \; psql feature should be documented somewhere

​agreed
 
 - all results should be shown, not just the last one

disagree

# select 1 ; select 2 ;
?column?
--------------
1
(1 row)

?column?
-------------
2
(1 row)


​Having

# select 1 \; select 2 ;

Result in identical behavior seems undesirable.  At least now if you want to discard all intermediate work and just show the last statement you can do so without going to any great lengths.  If you really want both results don't use "\;".  This makes even more sense when the earlier statements are DML instead of SELECT.

David J.


 

pgsql-hackers by date:

Previous
From: Kevin Grittner
Date:
Subject: Re: Re: [COMMITTERS] pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold <
Next
From: Michael Paquier
Date:
Subject: Re: Header and comments describing routines in incorrect shape in visibilitymap.c