Folding of case of identifiers

From: Niels Jespersen <NJN(at)dst(dot)dk>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Folding of case of identifiers
Date: 2022-01-11 11:52:43
Message-ID: d46916d0e9e84f66b158be52e5c4ad3a@dst.dk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello all

According to https://www.postgresql.org/docs/current/sql-syntax-lexical.html, "Key words and unquoted identifiers are case insensitive." And "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 ($)."

So far so good. Non-latin letters are included, which I take to also include the danish letters æøå/ÆØÅ.

However, name-folding is odd for these letters. Of these three create tables, the two first succeed, the last one does not (G and g is equivalent, Æ and æ is not).

create table æblegrød (a int, køn text);
create table ÆblegrØd (a int, køn text);
create table ÆbleGrØd (a int, køn text);

Can anyone explain the logic that rules this.

Regards Niels Jespersen

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Francisco Olarte 2022-01-11 12:49:49 Re: DROP OWNED BY fails with #53200: ERROR: out of shared memory
Previous Message Wolfgang Walther 2022-01-11 11:47:56 Re: DROP OWNED BY fails with #53200: ERROR: out of shared memory