Re: A PGsendQuery API design for your review
От | Karl O. Pinc |
---|---|
Тема | Re: A PGsendQuery API design for your review |
Дата | |
Msg-id | 20160202120419.0fbbf932@slate.meme.com обсуждение исходный текст |
Ответ на | Re: A PGsendQuery API design for your review (Christophe Pettus <xof@thebuild.com>) |
Ответы |
Re: A PGsendQuery API design for your review
|
Список | 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 по дате отправления: