Re: SQL-Invoked Procedures for 8.1

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Oliver Jowett <oliver(at)opencloud(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: SQL-Invoked Procedures for 8.1
Date: 2004-09-23 21:12:56
Message-ID: 12029.1095973976@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Oliver Jowett <oliver(at)opencloud(dot)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 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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-09-23 21:26:28 Re: doc patch for ssl in server
Previous Message Dominic Mitchell 2004-09-23 21:11:58 Re: doc patch for ssl in server