From: | Oleg Bartunov <oleg(at)sai(dot)msu(dot)su> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Robert Treat <xzilla(at)users(dot)sourceforge(dot)net>, Dennis Bjorklund <db(at)zigo(dot)dhs(dot)org>, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Should we still require RETURN in plpgsql? |
Date: | 2005-04-05 15:33:51 |
Message-ID: | Pine.GSO.4.62.0504051932560.15865@ra.sai.msu.su |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, 5 Apr 2005, Tom Lane wrote:
> Robert Treat <xzilla(at)users(dot)sourceforge(dot)net> writes:
>> While it is useless in this example, istm it only makes things more
>> confusing to require return in some cases but not in others. Is there
>> some technical advantage to dropping it?
>
> It's about the same either way as far as the code is concerned. But
> I've only written a dozen or so plpgsql functions using OUT parameters,
> and I've already found having to write a useless RETURN to be tedious
> (not to mention that I forgot it a couple times). I don't think I'll be
> the last one complaining if we leave in the requirement.
>
> Basically the requirement exists to make sure you don't forget to define
> the return value. But when you're using OUT parameters, the existence
> of a RETURN statement has nothing to do with defining the return value.
what if not require RETURN iff OUT parameter is defined ?
>
> regards, tom lane
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
>
Regards,
Oleg
_____________________________________________________________
Oleg Bartunov, sci.researcher, hostmaster of AstroNet,
Sternberg Astronomical Institute, Moscow University (Russia)
Internet: oleg(at)sai(dot)msu(dot)su, http://www.sai.msu.su/~megera/
phone: +007(095)939-16-83, +007(095)939-23-83
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2005-04-05 15:51:21 | Re: Should we still require RETURN in plpgsql? |
Previous Message | Marc G. Fournier | 2005-04-05 15:33:39 | Re: [HACKERS] plPHP in core? |