Re: PQsendQuery+PQgetResult+PQsetSingleRowMode limitations and support

From: "Karl O(dot) Pinc" <kop(at)meme(dot)com>
To: "Shulgin, Oleksandr" <oleksandr(dot)shulgin(at)zalando(dot)de>
Cc: Bruce Momjian <bruce(at)momjian(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PQsendQuery+PQgetResult+PQsetSingleRowMode limitations and support
Date: 2016-04-01 17:53:21
Message-ID: 20160401125321.5c58247f@slate.meme.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, 1 Apr 2016 05:57:33 +0200
"Shulgin, Oleksandr" <oleksandr(dot)shulgin(at)zalando(dot)de> wrote:

> On Apr 1, 2016 02:57, "Karl O. Pinc" <kop(at)meme(dot)com> wrote:
> >
> > I assume there are no questions about supporting a
> > similar functionality only without PQsetSingleRowMode,
> > as follows:
>
> Sorry, but I don't see what is your actual question here?

The question is whether or not the functionality of the first
script is supported. I ask since Bruce was surprised to see
this working and questioned whether PG was intended to behave
this way.

> Both code examples are going to compile and work, AFAICS. The
> difference is that the latter will try to fetch the whole result set
> into client's memory before returning you a PGresult.

Thanks for the clarification. For some reason I recently
got it into my head that the libpq buffering was on the server side,
which is really strange since I long ago determined it was
client side.

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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2016-04-01 17:57:51 Re: syntax sugar for conditional check
Previous Message Jim Nasby 2016-04-01 17:45:33 Re: syntax sugar for conditional check