Re: Return results for PQexec vs PQexecP*

From: "Jeroen T(dot) Vermeulen" <jtv(at)xs4all(dot)nl>
To: "Martijn van Oosterhout" <kleptog(at)svana(dot)org>
Cc: "Greg Sabino Mullane" <greg(at)turnstep(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Return results for PQexec vs PQexecP*
Date: 2006-05-17 15:08:06
Message-ID: 12820.58.8.76.221.1147878486.squirrel@webmail.xs4all.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jim C. Nasby 2006-05-17 15:08:58 Re: PL/pgSQL 'i = i + 1' Syntax
Previous Message Bruce Momjian 2006-05-17 15:06:48 Re: pg_dump and backslash escapes