Re: Inaccurate documentation about identifiers

From: Jeff Davis <pgsql(at)j-davis(dot)com>
To: Brennan Vincent <brennan(at)umanwizard(dot)com>, pgsql-bugs(at)lists(dot)postgresql(dot)org
Subject: Re: Inaccurate documentation about identifiers
Date: 2022-11-17 19:12:39
Message-ID: efcd5fee059c8868ca47525a8cfdc8f42cf95fdc.camel@j-davis.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2022-11-17 20:01:10 Re: Inaccurate documentation about identifiers
Previous Message Andres Freund 2022-11-17 18:55:29 Re: WAL segments removed from primary despite the fact that logical replication slot needs it.