Oliver Jowett <[EMAIL PROTECTED]> writes:
> Tom Lane wrote:
>>> How can clients distinguish multiple resultsets if they're using the 
>>> extended query protocol?
>> 
>> You'll get multiple repetitions of RowDescription/DataRows.

> Ah, so the Execute spontaneously generates a RowDescription 
> spontaneously when it hits the second resultset, without needing an 
> extra Describe?

Oh, wait, you won't get anything.  My example was using simple-Query
protocol.  In extended Query you get nothing, per this comment in
pquery.c:

    /*
     * If the destination is RemoteExecute, change to None.  The reason is
     * that the client won't be expecting any tuples, and indeed has no
     * way to know what they are, since there is no provision for Describe
     * to send a RowDescription message when this portal execution
     * strategy is in effect.  This presently will only affect SELECT
     * commands added to non-SELECT queries by rewrite rules: such
     * commands will be executed, but the results will be discarded unless
     * you use "simple Query" protocol.
     */

We will of course have to rethink this stuff if we want to be able to
send back multiple resultsets from a single procedure call ...

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

               http://archives.postgresql.org

Reply via email to