Re: SQL-Invoked Procedures for 8.1 - Mailing list pgsql-hackers

From Tom Lane
Subject Re: SQL-Invoked Procedures for 8.1
Date
Msg-id 12029.1095973976@sss.pgh.pa.us
Whole thread Raw
In response to Re: SQL-Invoked Procedures for 8.1  (Oliver Jowett <oliver@opencloud.com>)
Responses Re: SQL-Invoked Procedures for 8.1  (Oliver Jowett <oliver@opencloud.com>)
List pgsql-hackers
Oliver Jowett <oliver@opencloud.com> 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
anytuples, and indeed has no    * way to know what they are, since there is no provision for Describe    * to send a
RowDescriptionmessage 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
discardedunless    * 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


pgsql-hackers by date:

Previous
From: Greg Stark
Date:
Subject: Re: SQL-Invoked Procedures for 8.1
Next
From: Tom Lane
Date:
Subject: Re: [PATCHES] doc patch for ssl in server