[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgresql-general
Subject:    Re: [GENERAL] libpq - PQsendQuery wait for complete result
From:       icholy <ilia.choly () gmail ! com>
Date:       2012-11-30 14:03:24
Message-ID: 1354284204320-5734321.post () n5 ! nabble ! com
[Download RAW message or body]

Albe Laurenz *EXTERN* wrote
> If you have a single SQL statement, you will get only one
> PQresult.  You get more than one if you send a query string
> with more than one statement, e.g.
> 
> PQsendQuery(conn, "SELECT 42; SELECT 'Hello'");
> 
> would result in two PQresults.
> 
> You can get multiple PQresults only using asynchronous
> command processing; the corresponding PQexec would return
> only the PQresult of the *last* statement executed.
> 
> So you can get the same behaviour as PQexec by discarding
> all PQresults except for the last one.
> 
> Yours,
> Laurenz Albe
> 
> -- 
> Sent via pgsql-general mailing list (

> pgsql-general@

> )
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general

That makes sense. Thanks for teh quick reply!




--
View this message in context: \
http://postgresql.1045698.n5.nabble.com/libpq-PQsendQuery-wait-for-complete-result-tp5734111p5734321.html
 Sent from the PostgreSQL - general mailing list archive at Nabble.com.


-- 
Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic