pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Fabien COELHO <coelho@cri.ensmp.fr>
To: alaindewit@skynet.be, PostgreSQL Bugs <pgsql-bugs@lists.postgresql.org>
Subject: Re: BUG #16096: psql (non-interactive mode) SQL multi-request commands don't report all feedback ?!
Date: Wed, 6 Nov 2019 12:31:02 +0100 (CET)
Message-ID: <alpine.DEB.2.21.1911061226320.21586@lancre> (raw)
In-Reply-To: <16096-6744a334bbd01a04@postgresql.org>
References: <16096-6744a334bbd01a04@postgresql.org>


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.





view thread (2+ messages)

Message-ID: <alpine.DEB.2.21.1911061226320.21586@lancre>
Permalink:  ../alpine.DEB.2.21.1911061226320.21586@lancre/
Also on:    postgresql.org/message-id/alpine.DEB.2.21.1911061226320.21586@lancre

 · 

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: coelho@cri.ensmp.fr
  Subject: Re: BUG #16096: psql (non-interactive mode) SQL multi-request commands don't report all feedback ?!
  In-Reply-To: <alpine.DEB.2.21.1911061226320.21586@lancre>
  References: <16096-6744a334bbd01a04@postgresql.org> <alpine.DEB.2.21.1911061226320.21586@lancre>

* 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