Re: DatabaseMetaData.getExtraNameCharacters - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: DatabaseMetaData.getExtraNameCharacters
Date
Msg-id Pine.BSO.4.56.0505251452050.30233@leary.csoft.net
Whole thread Raw
In response to Re: DatabaseMetaData.getExtraNameCharacters  (Giuseppe Sacco <giuseppe@eppesuigoccas.homedns.org>)
Responses Re: DatabaseMetaData.getExtraNameCharacters
List pgsql-jdbc

On Wed, 25 May 2005, Giuseppe Sacco wrote:

> Il giorno mer, 25-05-2005 alle 13:25 -0500, Kris Jurka ha scritto:
> [...]
> > ident_start             [A-Za-z\200-\377_]
> > ident_cont              [A-Za-z\200-\377_0-9\$]
> > identifier              {ident_start}{ident_cont}*
> >
> > So \200-\377 is octal for any character with the high bit set.  The list
> > of what characters this could map to numbers in the tens of thousands for
> > unicode, so it's not really feasibly to return in this method.
>
> if I understand correclty, the valid charset is the one computed by the
> attached class. It seems to me that this is 191 characters long.
> Could you please let me know where I am wrong?

You are assuming that each character is only one byte.  The backend lexing
rules are a byte by byte operation, but the JDBC side is returning a
String of characters.  Consider the character "Latin Small Letter s with
Acute" (\u015B) gets encoded in UTF-8 as C5 9B or \305\233 in octal.  This
is one character in the result of getExtraNameCharacters.

Kris Jurka

pgsql-jdbc by date:

Previous
From: Giuseppe Sacco
Date:
Subject: Re: DatabaseMetaData.getExtraNameCharacters
Next
From: Oliver Jowett
Date:
Subject: Re: BIGINT <-> java.lang.String auto cast