Re: improve PQexec documentation

From: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
To: Fabien COELHO <coelho(at)cri(dot)ensmp(dot)fr>, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: PostgreSQL Developers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: improve PQexec documentation
Date: 2019-07-05 06:47:32
Message-ID: c027c1d1-78de-4d8c-d0df-ac2066520697@2ndquadrant.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2019-04-12 17:51, Fabien COELHO wrote:
> Hmmm. I obviously agree that PQexec is beyond awkward.
>
> Now I'm not sure how anyone is expected to guess the actual function
> working from the available documentation, and without this knowledge I
> cannot see how to write meaningful code for the multiple query case.

But you're not really supposed to use it for multiple queries or
multiple result sets anyway. There are other functions for this.

If a source code comment in libpq or psql would help explaining some of
the current code, then we could add that. But I am also not sure that
enshrining the current behavior on the API documentation is desirable.

> Basically it seems to have been designed for simple queries, and then
> accomodated somehow for the multiple case but with a strange non
> systematic approach.

probably

--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Eisentraut 2019-07-05 07:48:47 Re: make libpq documentation navigable between functions
Previous Message Tatsuo Ishii 2019-07-05 06:42:04 Re: Add client connection check during the execution of the query