Re: Found small issue with OUT params

From: Mike Rylander <mrylander(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Tony Caduto <tony_caduto(at)amsoftwaredesign(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Found small issue with OUT params
Date: 2005-09-29 22:06:00
Message-ID: b918cf3d050929150679f94256@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 9/29/05, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Tony Caduto <tony_caduto(at)amsoftwaredesign(dot)com> writes:
> > Please don't take this the wrong way, but don't you think even if a
> > single param is declared as OUT it should return the name of the OUT param?
>
> Not really, because "create function foo (in x int, out y float)" is
> supposed to have the same external behavior as "create function foo
> (in x int) returns float". I agree it's a bit of a judgment call, but
> I do not see a case for changing it.
>

Just my $0.02, but that seems inconsistent. In my mind, the
difference between functions with OUT params and functions that return
a RECORD (or a specific rowtype) is syntactic sugar. I'm pretty sure
that this was used to explain the implementation when it was being
discussed, in fact.

Using that logic, a functions with one OUT param would be the same as
a function returning a rowtype with only one column, and the one
column in such a rowtype certainly has a name of it's own.

--
Mike Rylander
mrylander(at)gmail(dot)com
GPLS -- PINES Development
Database Developer
http://open-ils.org

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Martin Pitt 2005-09-29 22:06:21 Re: horology regression test failure
Previous Message Alvaro Herrera 2005-09-29 22:02:47 Re: pg_total_relation_size() could not open relation with OID X