pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feedBUG #16096: psql (non-interactive mode) SQL multi-request commands don't report all feedback ?!
2+ messages / 2 participants
[nested] [flat]
* BUG #16096: psql (non-interactive mode) SQL multi-request commands don't report all feedback ?!
@ 2019-11-06 11:20 PG Bug reporting form <noreply@postgresql.org>
2019-11-06 11:31 ` Re: BUG #16096: psql (non-interactive mode) SQL multi-request commands don't report all feedback ?! Fabien COELHO <coelho@cri.ensmp.fr>
0 siblings, 1 reply; 2+ messages in thread
From: PG Bug reporting form @ 2019-11-06 11:20 UTC (permalink / raw)
To: pgsql-bugs@lists.postgresql.org; +Cc: alaindewit@skynet.be
The following bug has been logged on the website:
Bug reference: 16096
Logged by: Alain DE WIT
Email address: alaindewit@skynet.be
PostgreSQL version: 12.0
Operating system: Centos 7.7.1908
Description:
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 !!??
NOT A BIG ISSUE !!
Example (screen-shot):
[adw@postgresql12 ~]$ psql -h 127.0.0.1 -U portefeuille -d portefeuille -c
"INSERT INTO ma_table ( SELECT 1, SUM(valeur) FROM ma_table WHERE classe =
2);"
INSERT 0 1
[adw@postgresql12 ~]$
[adw@postgresql12 ~]$
[adw@postgresql12 ~]$ psql -h 127.0.0.1 -U portefeuille -d portefeuille -c
"INSERT INTO ma_table ( SELECT 1, SUM(valeur) FROM ma_table WHERE classe =
2); SELECT * FROM ma_table WHERE classe = 1;"
classe | valeur
--------+--------
1 | 10
1 | 20
1 | 300
1 | 990
1 | 990
1 | 990
1 | 990
(7 rows)
Test enviroment (I'm new at Postgres but have more than 10 years
porfessional exeprience in Oracle):
-°) Centos 7.7.1908 runnig under VirtualBox version 6.0.10
-°) Postgres 12.0 installed from the yum Repository
-°) Putty
-°) postgresql.conf not modified
Regards
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: BUG #16096: psql (non-interactive mode) SQL multi-request commands don't report all feedback ?!
2019-11-06 11:20 BUG #16096: psql (non-interactive mode) SQL multi-request commands don't report all feedback ?! PG Bug reporting form <noreply@postgresql.org>
@ 2019-11-06 11:31 ` Fabien COELHO <coelho@cri.ensmp.fr>
0 siblings, 0 replies; 2+ messages in thread
From: Fabien COELHO @ 2019-11-06 11:31 UTC (permalink / raw)
To: alaindewit@skynet.be, PostgreSQL Bugs <pgsql-bugs@lists.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.
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2019-11-06 11:31 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-11-06 11:20 BUG #16096: psql (non-interactive mode) SQL multi-request commands don't report all feedback ?! PG Bug reporting form <noreply@postgresql.org>
2019-11-06 11:31 ` Fabien COELHO <coelho@cri.ensmp.fr>
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