Re: Return results for PQexec vs PQexecP* - Mailing list pgsql-hackers

From Jeroen T. Vermeulen
Subject Re: Return results for PQexec vs PQexecP*
Date
Msg-id 12820.58.8.76.221.1147878486.squirrel@webmail.xs4all.nl
Whole thread Raw
In response to Re: Return results for PQexec vs PQexecP*  (Martijn van Oosterhout <kleptog@svana.org>)
List pgsql-hackers
On Wed, May 17, 2006 19:53, Martijn van Oosterhout wrote:

> The main problem with PQexec and co is that they don't really do very
> well if a single query produces multiple result sets. I'm not sure if
> it's defined whether you get the first or the last. In any case, if you
> want all the result sets, you need to be looking at PQsendquery and co.

AFAIK it's well-defined if you send multiple queries in a single string,
separated by semicolons: PQexec() returns the result of the last query.


Jeroen




pgsql-hackers by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: pg_dump and backslash escapes
Next
From: "Jim C. Nasby"
Date:
Subject: Re: PL/pgSQL 'i = i + 1' Syntax