Re: A PGsendQuery API design for your review - Mailing list psycopg

From Karl O. Pinc
Subject Re: A PGsendQuery API design for your review
Date
Msg-id 20160202120419.0fbbf932@slate.meme.com
Whole thread Raw
In response to Re: A PGsendQuery API design for your review  (Christophe Pettus <xof@thebuild.com>)
Responses Re: A PGsendQuery API design for your review
List psycopg
On Tue, 2 Feb 2016 09:52:33 -0800
Christophe Pettus <xof@thebuild.com> wrote:

>
> On Feb 2, 2016, at 9:49 AM, "Karl O. Pinc" <kop@meme.com> wrote:
>
> > I've got users who write and submit arbitrary sequences of SQL
> > to the server, as supported by psql, phpPgAdmin, pgAdmin, etc.
>
> Note that those are all applications, rather than interface libraries.

Yes.  And I take it back.  phpPgAdmin does not support the
submission of arbitrary sequences of SQL.  Or rather it does,
but you can only get the results of the last query.  This is
due to a limitation in the PHP PG API.

>
> > I'd like to see this sort of functionality in psycopg2.
>
> The client of psycopg2 can do this already, of course.

How?  In order to submit multiple statements to libpq
and get back results for all of them PGsendQuery() must
be called.

cursor.execute() will return results only from the last
query executed, like calling PGexec().  Or am I wrong?

Meanwhile, I don't see PGsetSingleRowMode() called anywhere
in psycopg2.  I figured as long as I was making an API
I'd provide for a way to get rid of the client-side buffering.
I figure that's a useful feature.

Regards,


Karl <kop@meme.com>
Free Software:  "You don't pay back, you pay forward."
                 -- Robert A. Heinlein


psycopg by date:

Previous
From: Christophe Pettus
Date:
Subject: Re: A PGsendQuery API design for your review
Next
From: Christophe Pettus
Date:
Subject: Re: A PGsendQuery API design for your review