Re: plpgsql variable named as SQL keyword

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: plpgsql variable named as SQL keyword
Date: 2019-02-28 18:20:20
Message-ID: 20354.1551378020@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Pavel Stehule <pavel(dot)stehule(at)gmail(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Mahendra Singh 2019-02-28 18:22:47 Re: Question about pg_upgrade from 9.2 to X.X
Previous Message Andres Freund 2019-02-28 18:18:36 Re: [HACKERS] EvalPlanQual behaves oddly for FDW queries involving system columns