Re: returning multiple result sets from a stored procedure

From: Bruce Momjian <bruce(at)momjian(dot)us>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Darren Duncan <darren(at)darrenduncan(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: returning multiple result sets from a stored procedure
Date: 2010-09-10 15:27:40
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

Pavel Stehule wrote:
> 2010/9/9 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
> > Darren Duncan <darren(at)darrenduncan(dot)net> writes:
> >> Since Pg's FUNCTION already seems to take on both roles, so overloading the
> >> meaning of the FUNCTION keyword, like what a C function or a Perl sub does,
> >> where returning VOID means procedure, then what is being added by a distinct
> >
> > You might care to go back and re-read some of the extensive prior
> > threads about this, but to my mind the main thing that would justify
> > inventing a separate PROCEDURE facility is if procedures were to execute
> > outside the transaction system, so that they could start and stop
> > transactions for themselves. ?This is unlike a function which
> > necessarily executes inside an already-running transaction. ?Of course
> > a lot of questions would need to be answered about error-handling
> > behavior and so forth, but that's a capability that a LOT of people
> > have asked for.
> >
> it's only one request from two mayor request
> * transaction handling
> * unbound SELECTs and multirecordset support
> and some more classic handling of OUT variables.

I assume the current thought is that our "functions" would remain
unchanged and new "procedures" would allow either of these. I have
updated the "procedure" todo item to read:

Implement stored procedures

This might involve the control of transaction state and the return of multiple result sets

* PL/pgSQL stored procedure returning multiple result sets (SELECTs)?
* Proposal: real procedures again (8.4)

Bruce Momjian <bruce(at)momjian(dot)us>

+ It's impossible for everything to be true. +

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2010-09-10 15:36:17 Re: git: uh-oh
Previous Message Tom Lane 2010-09-10 13:27:09 Re: git: uh-oh