Re: [HACKERS] Dynamic result sets from procedures - Mailing list pgsql-hackers

From Robert Haas
Subject Re: [HACKERS] Dynamic result sets from procedures
Date
Msg-id CA+TgmoZaPNHu-2SxhfuhfDvF0T5KeCRF5raFzAJn0PQqZCyAhw@mail.gmail.com
Whole thread Raw
In response to [HACKERS] Dynamic result sets from procedures  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Responses Re: [HACKERS] Dynamic result sets from procedures
List pgsql-hackers
On Wed, Nov 1, 2017 at 2:38 AM, Peter Eisentraut
<peter.eisentraut@2ndquadrant.com> wrote:
> So this is what it can do:
>
> CREATE PROCEDURE pdrstest1()
> LANGUAGE SQL
> AS $$
> DECLARE c1 CURSOR WITH RETURN FOR SELECT * FROM cp_test2;
> DECLARE c2 CURSOR WITH RETURN FOR SELECT * FROM cp_test3;
> $$;
>
> CALL pdrstest1();
>
> and that returns those two result sets to the client.

That seems like it is at least arguably a wire protocol break.  Today,
if you send a string containing only one command, you will only get
one answer.

I'm not saying that makes this change utterly unacceptable or anything
-- but I wonder how much application code it will break, and whether
any steps need to be taken to reduce breakage.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: [HACKERS] SQL/JSON in PostgreSQL
Next
From: Craig Ringer
Date:
Subject: Re: [HACKERS] Statement-level rollback