Re: Sanding down some edge cases for PL/pgSQL reserved words

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org, Jan Behrens <jbe-mlist(at)magnetkern(dot)de>
Subject: Re: Sanding down some edge cases for PL/pgSQL reserved words
Date: 2025-06-08 20:11:26
Message-ID: CAFj8pRDP2jr4rT7E+z3Gf5vC+1xEKW39ng2Oe0Qr5+YRRbXyAw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi

>
>> 2. That "has no field" error message is flat-out wrong. The now-known
>> way to trigger it has a different cause, and what's more, we simply do
>> not know at this point whether the malleable record type has such a
>> field. So in 0002 below I just changed it to assume that the problem
>> is a reserved field name. We might find another way to reach that
>> failure in future, but I doubt that "has no field" would be the right
>> thing to say in any case.
>>
>
> The proposed patch is a zero invasive solution. But the question is why we
> cannot allow plpgsql reserved keywords in recfilds?
>
> There should not be any collisions. Isn't there a better solution to
> modify plpgsql_yylex instead and allow all keywords after '.' ? Sure. It
> will be more invasive.
>

Is there some description of what keywords should be reserved? If I
remember correctly, the scanner was changed more times, and maybe more
reserved keywords are not necessary.

Regards

Pavel

> Regards
>
> Pavel
>
>
>
>
>> This is v19 material at this point, so I'll stick it on the CF queue.
>>
>> regards, tom lane
>>
>> [1]
>> https://www.postgresql.org/message-id/flat/18693-65968418890877b4%40postgresql.org
>>
>>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2025-06-08 20:38:40 Re: pg_restore - cannot to restore blobs in dictionary format from older pg dumps
Previous Message Tom Lane 2025-06-08 19:15:43 Re: Non-reproducible AIO failure