From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
---|---|
To: | Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr> |
Cc: | PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org> |
Subject: | Re: improve PQexec documentation |
Date: | 2019-04-12 13:12:11 |
Message-ID: | 20190412131211.GA7287@alvherre.pgsql |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 2019-Apr-12, Fabien COELHO wrote:
> I'm looking at psql's use of PQexec for implementing some feature.
>
> When running with multiple SQL commands, the doc is not very helpful.
>
> From the source code I gathered that PQexec returns the first COPY results
> if any, and if not the last non-empty results, unless all is empty in which
> case an empty result is returned.
I'm not sure we necessarily want to document this behavior. If it was
super helpful for some reason, or if we thought we would never change
it, then it would make sense to document it in minute detail. But
otherwise I think documenting it sets a promise that we would (try to)
never change it in the future, which I don't necessarily agree with --
particularly since it's somewhat awkward to use.
I'm inclined to reject this patch.
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2019-04-12 13:20:14 | Re: PostgreSQL pollutes the file system |
Previous Message | Masahiko Sawada | 2019-04-12 13:06:41 | Re: Calling pgstat_report_wait_end() before ereport(ERROR) |