Re: [HACKERS] [bug fix] Savepoint-related statements terminates connection - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] [bug fix] Savepoint-related statements terminates connection
Date
Msg-id 14417.1504892479@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] [bug fix] Savepoint-related statements terminates connection  (Catalin Iacob <iacobcatalin@gmail.com>)
List pgsql-hackers
Catalin Iacob <iacobcatalin@gmail.com> writes:
> When reading this I also realized that the backend does send responses for
> every individual query in a multi-query request, it's only libpq's PQexec
> that throws away the intermediate results and only provides access to the
> last one.

If you want to see them all, you can use PQsendQuery/PQgetResult.

https://www.postgresql.org/docs/current/static/libpq-async.html

There's a case to be made that we should change psql to use these
and print all the results not just the last one.  I've not looked
to see how much work that would be; but now that we're actually
documenting how to script multi-command queries, it might be
a good idea to fix it before too many people have scripts that
rely on the current behavior.
        regards, tom lane


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

pgsql-hackers by date:

Previous
From: Ashutosh Bapat
Date:
Subject: Re: [HACKERS] Partition-wise join for join between (declaratively)partitioned tables
Next
From: Daniel Gustafsson
Date:
Subject: Re: [HACKERS] PoC plpgsql - possibility to force custom or generic plan