Re: returning multiple result sets from a stored procedure - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: returning multiple result sets from a stored procedure
Date
Msg-id AANLkTik1nXrx0=b9Z+RoUHdbdfvv6hwi--Jz1Nn_Kw0s@mail.gmail.com
Whole thread Raw
In response to Re: returning multiple result sets from a stored procedure  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
List pgsql-hackers
2010/9/9 Kevin Grittner <Kevin.Grittner@wicourts.gov>:
> Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
>> I'm with Robert: this would be a huge extra complication for a
>> remarkably small amount of benefit.
>
> This is probably heresy, but unless it's required by the standard or
> drop-dead simple to allow, I'd be fine with *not* supporting
> overloading of stored procedure names based on argument types at
> all.  I can see the need for to support it for functions; I can't
> think where it would be all that useful for stored procedures.  If
> unique stored procedure names were required, it seems we might be
> able to allow assignment casts on parameters, which might be more
> useful.
>
> I'm probably missing some good use case....

for example - value transformation from / to bytea

CREATE FUNCTION send(int);
CREATE FUNCTION send(text);
CREATE FUNCTION recv(int);
CREATE FUNCTION recv(text)

then you can write

BEGIN send('ahoj'); send(10); recv(textvar); recv(numvar);

Regards

Pavel Stehule

>
> -Kevin
>


pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: returning multiple result sets from a stored procedure
Next
From: Darren Duncan
Date:
Subject: Re: returning multiple result sets from a stored procedure