Re: [HACKERS] Revised proposal for libpq and FE/BE protocol changes - Mailing list pgsql-hackers

From Tom Lane
Subject Re: [HACKERS] Revised proposal for libpq and FE/BE protocol changes
Date
Msg-id 8629.893860526@sss.pgh.pa.us
Whole thread Raw
In response to Re: [HACKERS] Revised proposal for libpq and FE/BE protocol changes  (Michael Meskes <meskes@topsystem.de>)
List pgsql-hackers
Michael Meskes <meskes@topsystem.de> writes:
> Does this mean I can read in a complete C array with one call? I mean
> something like this:
> char emp_name[10][10];
> exec sql select name into :emp_name from emp;

As far as I know that works now; or at least, if it doesn't work it's
a limitation of the embedded-SQL interface, and not anything that has
to do with libpq or the fe/be protocol.

A "result" in libpq's terms is the result of a single SQL command.
The result of a successful query, for example, is typically multiple
rows of data.  You only need a PQgetResult loop if (a) you send a
query string that contains several commands, or (b) you issue a
query whose answer contains more than one kind of tuple.

            regards, tom lane

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [HACKERS] Revised proposal for libpq and FE/BE protocol changes
Next
From: Tom Lane
Date:
Subject: Re: [HACKERS] Re: [INTERFACES] Revised proposal for libpq and FE/BE protocol changes