Re: Full Stored Procedure Support, any time soon ? - Mailing list pgsql-general

From Thomas Kellerer
Subject Re: Full Stored Procedure Support, any time soon ?
Date
Msg-id l7dobh$4qu$1@ger.gmane.org
Whole thread Raw
In response to Re: Full Stored Procedure Support, any time soon ?  (Alban Hertroys <haramrae@gmail.com>)
Responses Re: Full Stored Procedure Support, any time soon ?  (Noel Diaz <zerg2k@yahoo.com>)
List pgsql-general
Alban Hertroys wrote on 30.11.2013 22:34:
>> - Multiple result sets
>
> Since you’re talking about procedures, you can’t possibly mean that those return multiple result sets?

Yes, basically something like this:

create procedure foobar()
begin
   select * from table_1;
   select * from table_2
end;

I know that at least SQL Server and MySQL can do that. Maybe others as well (Sybase most probably).

But I always failed do see the actual advantage of that because the results can't be "used" any further (e.g. in a JOIN
ora subselect). 
I also don't understand why having a single procedure doing a lot of stuff is better than having several procedures (or
functions)doing one defined thing. 

 From a JDBC point of view the code simply asks the Statement whether it has any more result sets
and loops over this until all results are returned.

Thomas

pgsql-general by date:

Previous
From: Noel Diaz
Date:
Subject: Re: Full Stored Procedure Support, any time soon ?
Next
From: Noel Diaz
Date:
Subject: Re: Full Stored Procedure Support, any time soon ?