Re: returning multiple result sets from a stored procedure

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Robert Haas <robertmhaas(at)gmail(dot)com>, 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-09 21:40:40
Message-ID: AANLkTi=bgVcNn36F1CWALaYUrCcXqnbHk8o-s0s6EvG=@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2010/9/9 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
> Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> writes:
>> 2010/9/9 Robert Haas <robertmhaas(at)gmail(dot)com>:
>>> That seems like a lot of complexity for no real benefit, to me.
>
>> no, you can to specify a expected result type - it's very  for some
>> convert or import functions. So we expect so out procedures will
>> supports to OUT parameters, then implementation of this mechanism has
>> minimal overhead to current implementation. Just to add types of OUT
>> parameters to searching algorithm.
>
> It's *not* trivial, not at all.  You are ignoring all of the semantic
> implications.  Should foo(IN x int, OUT y int) be considered different
> from, and thus allowed to exist at the same time as, foo(IN x int,
> OUT y float)?  If so, how do you represent that in the catalogs?
> Possibly more to the point, any such decision means that it'll be
> impossible to call any stored procedure without fully specifying the
> types of output arguments as well as input arguments, else the system
> can't tell which procedure you meant to call.  That doesn't sound like
> a notational improvement to me.

it can be a foo(int, int) and foo(int, float) in catalog. These lists
are distinct so there are not a problem.

>
> I'm with Robert: this would be a huge extra complication for a
> remarkably small amount of benefit.
>

I don't agree - you see a procedure like some void function, and it's not true

Regards

Pavel

>                        regards, tom lane
>

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2010-09-09 21:47:28 Re: returning multiple result sets from a stored procedure
Previous Message Kevin Grittner 2010-09-09 21:26:11 Re: returning multiple result sets from a stored procedure