pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Arseny Sher <a.sher@postgrespro.ru>
To: pgsql-docs@postgresql.org
Subject: Is PQgetResult() guaranteed to return the whole SQL command result?
Date: Wed, 13 Dec 2017 16:50:59 +0300
Message-ID: <87o9n2hh30.fsf@ars-thinkpad> (raw)

Hi,

I wonder is it guaranteed that one PQgetResult() call returns result for
the whole one statement (SQL command) in usual (not SingleRow) mode?
For instance, if I run PQsendQuery with query consisting of two
statements (separated by semicolons), is possible to have three or more
PQgetResult calls returning data? I guess not, but it seems to be not
clear from the docs.

PQgetResult description says:

Waits for the next result from a prior call...

Does one "result" here correspond to one statement?

--
Arseny Sher
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company 




view thread (3+ messages)  latest in thread

Message-ID: <87o9n2hh30.fsf@ars-thinkpad>
Permalink:  ../87o9n2hh30.fsf@ars-thinkpad/
Also on:    postgresql.org/message-id/87o9n2hh30.fsf@ars-thinkpad

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: a.sher@postgrespro.ru
  Subject: Re: Is PQgetResult() guaranteed to return the whole SQL command result?
  In-Reply-To: <87o9n2hh30.fsf@ars-thinkpad>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox