Re: BUG #16096: psql (non-interactive mode) SQL multi-request commands don't report all feedback ?!

From: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>
To: alaindewit(at)skynet(dot)be, PostgreSQL Bugs <pgsql-bugs(at)lists(dot)postgresql(dot)org>
Subject: Re: BUG #16096: psql (non-interactive mode) SQL multi-request commands don't report all feedback ?!
Date: 2019-11-06 11:31:02
Message-ID: alpine.DEB.2.21.1911061226320.21586@lancre
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


Bonjour Alain,

> When performing one INSERT SQL command in non-interactive mode I get a
> feedback about the number of line inserted. OK
> When performing the INSERT command SQL request following by for example a
> select ; I don't get any feedback of the insert command !!??

This is because -c passes the string as ONE sql command, and for
multi-statement commands psql only reports about the last one.

The equivalent in interactive mode is to use \; between SQL commands.

ISTM that this is the documented behavior, so it is not a bug.

There is a submitted patch to change it to show all results:

https://commitfest.postgresql.org/25/2096/

--
Fabien.

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Thomas Butz 2019-11-06 11:48:16 Re: BUG #16095: Segfault while executing trigger
Previous Message PG Bug reporting form 2019-11-06 11:20:15 BUG #16096: psql (non-interactive mode) SQL multi-request commands don't report all feedback ?!