Re: unexpected psql "feature"

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
Cc: PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: unexpected psql "feature"
Date: 2016-07-13 20:57:24
Message-ID: CAKFQuwaoorvwWMP8NpQf8j9TQCgrNsvvkvoXc-bKh71qu1gUJw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Jul 13, 2016 at 4:47 PM, Fabien COELHO <coelho(at)cri(dot)ensmp(dot)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.


In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2016-07-13 21:02:55 Re: Header and comments describing routines in incorrect shape in visibilitymap.c
Previous Message Kevin Grittner 2016-07-13 20:57:02 Re: Re: [COMMITTERS] pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold <