Re: plpgsql variable named as SQL keyword - Mailing list pgsql-hackers

From Tom Lane
Subject Re: plpgsql variable named as SQL keyword
Date
Msg-id 20354.1551378020@sss.pgh.pa.us
Whole thread Raw
In response to plpgsql variable named as SQL keyword  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: plpgsql variable named as SQL keyword  (Pavel Stehule <pavel.stehule@gmail.com>)
List pgsql-hackers
Pavel Stehule <pavel.stehule@gmail.com> writes:
> Maybe we should to disallow variables named as sql reserved keyword.

That would just break existing code.  There are lots of other
examples where you can get away with such things.

We've expended quite a lot of sweat to avoid reserving more names than
we had to in plpgsql.  I'm disinclined to throw that away just because
somebody found an error message confusing.  It's not like reserving
"offset" would cause this case to work.

            regards, tom lane


pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: [HACKERS] EvalPlanQual behaves oddly for FDW queries involvingsystem columns
Next
From: Mahendra Singh
Date:
Subject: Re: Question about pg_upgrade from 9.2 to X.X