Re: Found small issue with OUT params

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

Tom Lane wrote:

>Mike Rylander <mrylander(at)gmail(dot)com> writes:
>
>
>>Using that logic, a functions with one OUT param would be the same as
>>a function returning a rowtype with only one column,
>>
>>
>
>But it's not (and no, I don't want to make it so, because the overhead
>for the useless record result would be significant).
>
> regards, tom lane
>
>---------------------------(end of broadcast)---------------------------
>TIP 6: explain analyze is your friend
>
>
>
Tom,
I hardly think the overhead would be significant on modern processors, I
don't think the majority of users are running on Pentium 90s.( I am
assuming you mean a performance overhead)

The whole point is the current behavior is inconsistent and not expected
and should be changed to be inline with the way other DB systems work.
What is the point of even allowing a single OUT param then? You might
as well just raise a error and tell the user that a single OUT param is
not allowed.
8.1 is going to bring even more users over from systems like Firebird,
MS SQL and even Oracle, and all of these allow a single OUT param and it
returns the name of the OUT param, not the name of the function. Like I
said before this behavior is going to make it more difficult to port
applications from other systems.

How difficult can it be to check if the function has a single OUT param
as compared to the old way of using RETURN?

Sorry if I am being a pain in the you know what, but I really think I am
correct on this matter.

Thanks,

Tony

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Martijn van Oosterhout 2005-09-30 15:49:53 Re: Found small issue with OUT params
Previous Message Magnus Hagander 2005-09-30 14:13:37 Re: Socket problem using beta2 on Windows-XP