Re: Inaccurate documentation about identifiers - Mailing list pgsql-bugs

From Jeff Davis
Subject Re: Inaccurate documentation about identifiers
Date
Msg-id efcd5fee059c8868ca47525a8cfdc8f42cf95fdc.camel@j-davis.com
Whole thread Raw
In response to Inaccurate documentation about identifiers  (Brennan Vincent <brennan@umanwizard.com>)
Responses Re: Inaccurate documentation about identifiers  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
On Wed, 2022-11-16 at 08:36 -0500, Brennan Vincent wrote:
> Hello,
>
> The documentation states:
>
> "SQL identifiers and key words must begin with a letter (a-z, but
> also letters
> with diacritical marks and non-Latin letters) or an underscore (_).
> Subsequent
> characters in an identifier or key word can be letters, underscores,
> digits
> (0-9), or dollar signs ($)"
>
> However, it seems that all non-ASCII characters are considered
> "letters"

You're correct: it seems to allow any byte with the high bit set;
including, for example, a zero-width space.

I don't think we want to change the documentation here, because that
would amount to a promise that we support such identifiers forever.

I also don't think we want to change the code, because it opens up
several problems and I'm not sure it's worth trying to solve them.

Is there any harm just leaving it as-is?


--
Jeff Davis
PostgreSQL Contributor Team - AWS





pgsql-bugs by date:

Previous
From: Andres Freund
Date:
Subject: Re: WAL segments removed from primary despite the fact that logical replication slot needs it.
Next
From: Tom Lane
Date:
Subject: Re: Inaccurate documentation about identifiers