Re: Re: [COMMITTERS] pgsql: Instead of trying (and failing) to allow <<label>> at the end of

Lists: pgsql-committerspgsql-hackers
From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Instead of trying (and failing) to allow <<label>> at the end of
Date: 2010-03-03 01:53:17
Message-ID: [email protected]
Views: Whole Thread | Raw Message | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

Log Message:
-----------
Instead of trying (and failing) to allow <<label>> at the end of a DECLARE
section, throw an error message saying explicitly that the label must go
before DECLARE. Per investigation of a recent pgsql-novice question,
this code did not work as intended in any modern PG version, maybe not ever.
Allowing such a thing would only create ambiguity anyway, so it seems better
to remove it than fix it.

Modified Files:
--------------
pgsql/src/pl/plpgsql/src:
gram.y (r1.141 -> r1.142)
(http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/pl/plpgsql/src/gram.y?r1=1.141&r2=1.142)


From: Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec>
To: Tom Lane <tgl(at)postgresql(dot)org>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Instead of trying (and failing) to allow <<label>> at the end of
Date: 2010-03-03 04:02:54
Message-ID: [email protected]
Views: Whole Thread | Raw Message | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

On Tue, Mar 2, 2010 at 8:53 PM, Tom Lane <tgl(at)postgresql(dot)org> wrote:
> Log Message:
> -----------
> Instead of trying (and failing) to allow <<label>> at the end of a DECLARE
> section, throw an error message saying explicitly that the label must go
> before DECLARE.

with the docs saying another thing, this couldn't be considered as a
bug fix and therefore backpatchable

--
Atentamente,
Jaime Casanova
Soporte y capacitación de PostgreSQL
Asesoría y desarrollo de sistemas
Guayaquil - Ecuador
Cel. +59387171157


From: David Fetter <david(at)fetter(dot)org>
To: PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [COMMITTERS] pgsql: Instead of trying (and failing) to allow <<label>> at the end of
Date: 2010-03-03 04:59:49
Message-ID: [email protected]
Views: Whole Thread | Raw Message | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

On Tue, Mar 02, 2010 at 11:02:54PM -0500, Jaime Casanova wrote:
> On Tue, Mar 2, 2010 at 8:53 PM, Tom Lane <tgl(at)postgresql(dot)org> wrote:
> > Log Message:
> > -----------
> > Instead of trying (and failing) to allow <<label>> at the end of a DECLARE
> > section, throw an error message saying explicitly that the label must go
> > before DECLARE.
>
> with the docs saying another thing, this couldn't be considered as a
> bug fix and therefore backpatchable

+1 for back-patching.

Cheers,
David.
--
David Fetter <david(at)fetter(dot)org> http://fetter.org/
Phone: +1 415 235 3778 AIM: dfetter666 Yahoo!: dfetter
Skype: davidfetter XMPP: david(dot)fetter(at)gmail(dot)com
iCal: webcal://www.tripit.com/feed/ical/people/david74/tripit.ics

Remember to vote!
Consider donating to Postgres: http://www.postgresql.org/about/donate


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: David Fetter <david(at)fetter(dot)org>
Cc: PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Re: [COMMITTERS] pgsql: Instead of trying (and failing) to allow <<label>> at the end of
Date: 2010-03-03 06:00:26
Message-ID: [email protected]
Views: Whole Thread | Raw Message | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

David Fetter <david(at)fetter(dot)org> writes:
> On Tue, Mar 02, 2010 at 11:02:54PM -0500, Jaime Casanova wrote:
>> On Tue, Mar 2, 2010 at 8:53 PM, Tom Lane <tgl(at)postgresql(dot)org> wrote:
>>> Instead of trying (and failing) to allow <<label>> at the end of a DECLARE
>>> section, throw an error message saying explicitly that the label must go
>>> before DECLARE.
>>
>> with the docs saying another thing, this couldn't be considered as a
>> bug fix and therefore backpatchable

> +1 for back-patching.

No, I intentionally didn't back-patch that. The only benefit of the
change is throwing a useful error message for questionable syntax.
As against that we have the possibility of breaking code that works
now, if someone's got an incorrectly-placed label that they're not
actually referencing. I grant that that's not a very likely case;
but the error that the message would help people fix isn't very
likely either, as demonstrated by the fact that this never came up
before. We shouldn't be making changes in the behavior of back
branches for such things.

regards, tom lane


From: Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: David Fetter <david(at)fetter(dot)org>, PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Re: [COMMITTERS] pgsql: Instead of trying (and failing) to allow <<label>> at the end of
Date: 2010-03-03 06:07:11
Message-ID: [email protected]
Views: Whole Thread | Raw Message | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

On Wed, Mar 3, 2010 at 1:00 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> David Fetter <david(at)fetter(dot)org> writes:
>> On Tue, Mar 02, 2010 at 11:02:54PM -0500, Jaime Casanova wrote:
>>> On Tue, Mar 2, 2010 at 8:53 PM, Tom Lane <tgl(at)postgresql(dot)org> wrote:
>>>> Instead of trying (and failing) to allow <<label>> at the end of a DECLARE
>>>> section, throw an error message saying explicitly that the label must go
>>>> before DECLARE.
>>>
>>> with the docs saying another thing, this couldn't be considered as a
>>> bug fix and therefore backpatchable
>
>> +1 for back-patching.
>
> No, I intentionally didn't back-patch that.  The only benefit of the
> change is throwing a useful error message for questionable syntax.

then, maybe a fix in the docs of back branches? OTOH, anyone that
already had the docs downloaded will not benefit of that, but that is
just as fair as if you don't update the server you don't get the last
fixes ;)

--
Atentamente,
Jaime Casanova
Soporte y capacitación de PostgreSQL
Asesoría y desarrollo de sistemas
Guayaquil - Ecuador
Cel. +59387171157


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec>
Cc: David Fetter <david(at)fetter(dot)org>, PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Re: [COMMITTERS] pgsql: Instead of trying (and failing) to allow <<label>> at the end of
Date: 2010-03-03 06:12:16
Message-ID: [email protected]
Views: Whole Thread | Raw Message | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec> writes:
> On Wed, Mar 3, 2010 at 1:00 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> No, I intentionally didn't back-patch that. The only benefit of the
>> change is throwing a useful error message for questionable syntax.

> then, maybe a fix in the docs of back branches?

What's to fix? The documentation already makes it quite clear where
you're supposed to put the label. I think documenting the code's
actual behavior could only confuse people.

regards, tom lane


From: Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: David Fetter <david(at)fetter(dot)org>, PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Re: [COMMITTERS] pgsql: Instead of trying (and failing) to allow <<label>> at the end of
Date: 2010-03-03 06:37:30
Message-ID: [email protected]
Views: Whole Thread | Raw Message | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

On Wed, Mar 3, 2010 at 1:12 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Jaime Casanova <jcasanov(at)systemguards(dot)com(dot)ec> writes:
>> On Wed, Mar 3, 2010 at 1:00 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>> No, I intentionally didn't back-patch that.  The only benefit of the
>>> change is throwing a useful error message for questionable syntax.
>
>> then, maybe a fix in the docs of back branches?
>
> What's to fix?  The documentation already makes it quite clear where
> you're supposed to put the label.  I think documenting the code's
> actual behavior could only confuse people.
>

ah! yeah! sorry for the noise... it was just the need to say something
else... ;)

--
Atentamente,
Jaime Casanova
Soporte y capacitación de PostgreSQL
Asesoría y desarrollo de sistemas
Guayaquil - Ecuador
Cel. +59387171157