pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Niels Jespersen <NJN@dst.dk>
To: pgsql-general@postgresql.org <pgsql-general@postgresql.org>
Subject: Folding of case of identifiers
Date: Tue, 11 Jan 2022 11:52:43 +0000
Message-ID: <d46916d0e9e84f66b158be52e5c4ad3a@dst.dk> (raw)

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








view thread (2+ messages)  latest in thread

Message-ID: <d46916d0e9e84f66b158be52e5c4ad3a@dst.dk>
Permalink:  ../d46916d0e9e84f66b158be52e5c4ad3a@dst.dk/
Also on:    postgresql.org/message-id/d46916d0e9e84f66b158be52e5c4ad3a@dst.dk

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: NJN@dst.dk
  Subject: Re: Folding of case of identifiers
  In-Reply-To: <d46916d0e9e84f66b158be52e5c4ad3a@dst.dk>
  References: <d46916d0e9e84f66b158be52e5c4ad3a@dst.dk>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox