From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | Andres Freund <andres(at)anarazel(dot)de> |
Cc: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>, David Fetter <david(at)fetter(dot)org>, Kyotaro HORIGUCHI <horiguchi(dot)kyotaro(at)lab(dot)ntt(dot)co(dot)jp>, wufei(dot)fnst(at)cn(dot)fujitsu(dot)com, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Willing to fix a PQexec() in libpq module |
Date: | 2019-03-19 17:46:31 |
Message-ID: | 22244.1553017591@sss.pgh.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Andres Freund <andres(at)anarazel(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Haas | 2019-03-19 18:47:00 | Re: [HACKERS] CLUSTER command progress monitor |
Previous Message | Alexander Korotkov | 2019-03-19 17:37:08 | Re: Concurrency bug with vacuum full (cluster) and toast |