Re: a few small bugs in plpgsql

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>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: a few small bugs in plpgsql
Date: 2010-10-08 04:13:38
Message-ID: AANLkTikd6+OcAHnAGp=MsEa=3HpE7G1SScL7RALoyD_A@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

2010/10/8 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> On Thu, Oct 7, 2010 at 2:53 PM, Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com> wrote:
>>> b) SRF functions must not be finished by RETURN statement - I know, so
>>> there is outer default block, but it looks like inconsistency for SRF
>>> functions, because you can use a RETURN NEXT without RETURN. It maybe
>>> isn't bug - but I am filling it as inconsistency.
>
>> I don't see what's wrong with this.
>
> Back around 8.0 we intentionally changed plpgsql to not require a final
> RETURN in cases where RETURN isn't used to supply the result value:
> http://archives.postgresql.org/pgsql-hackers/2005-04/msg00152.php
> http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=e00ee887612da0dab02f1a56e33d8ae821710e14
>
> Even if there were a good argument for going back to the old way,
> backwards-compatibility would win the day, I think.  Being strict
> about this --- in *either* direction --- would break a lot of code.
>
>                        regards, tom lane

ok, understand - thank you. I think so it was not a best decision -
the RETURN statement helps with higher verbosity, but I can accept so
there are not way to back.

Regards

Pavel

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Joshua D. Drake 2010-10-08 05:30:03 Re: Issues with Quorum Commit
Previous Message Pavel Stehule 2010-10-08 04:08:52 Re: a few small bugs in plpgsql