Re: Willing to fix a PQexec() in libpq module

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Willing to fix a PQexec() in libpq module
Дата
Msg-id 22244.1553017591@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Willing to fix a PQexec() in libpq module  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
Andres Freund <andres@anarazel.de> writes:
> On 2019-03-19 13:18:25 -0400, Tom Lane wrote:
>> Having said that ... a better argument for a new API is that it
>> could be explicitly designed to handle multiple queries, and in
>> particular make some provision for returning multiple PGresults.

> Oh, I completely agree, that'd be hugely useful.

Of course, you can do that already with PQsendQuery + a loop
around PQgetResult.  So the question here is whether that can
be wrapped up into something easier-to-use.  I'm not entirely
sure what that might look like.

We should also keep in mind that there's a perfectly valid
use-case for wanting to send a big script of commands and
just check for overall success or failure.  So it's not like
PQexec's current behavior has *no* valid uses.

            regards, tom lane


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Alexander Korotkov
Дата:
Сообщение: Re: Concurrency bug with vacuum full (cluster) and toast
Следующее
От: Robert Haas
Дата:
Сообщение: Re: [HACKERS] CLUSTER command progress monitor