From: | Thomas Kellerer <spam_eater(at)gmx(dot)net> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Full Stored Procedure Support, any time soon ? |
Date: | 2013-11-30 22:21:36 |
Message-ID: | l7dobh$4qu$1@ger.gmane.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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 or a 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
From | Date | Subject | |
---|---|---|---|
Next Message | Noel Diaz | 2013-11-30 22:30:59 | Re: Full Stored Procedure Support, any time soon ? |
Previous Message | Tom Lane | 2013-11-30 22:03:31 | Re: [GENERAL] pg_upgrade ?deficiency |