Skip site navigation (1) Skip section navigation (2)

Re: Bug in UTF8-Validation Code?

From: Mark Dilger <pgsql(at)markdilger(dot)com>
To: Albe Laurenz <all(at)adv(dot)magwien(dot)gv(dot)at>
Subject: Re: Bug in UTF8-Validation Code?
Date: 2007-04-03 16:44:36
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Albe Laurenz wrote:
> What I suggest (and what Oracle implements, and isn't CHR() and ASCII()
> partly for Oracle compatibility?) is that CHR() and ASCII()
> convert between a character (in database encoding) and
> that database encoding in numeric form.

Looking at Oracle documentation, it appears that you get different 
behavior from CHR(X [USING NCHAR_CS]) depending on whether you call it 
with the argument USING NCHAR_CS.  Oracle 9i and higher have an 
additional function called NCHR(X) which is supposed to be the same as 

On it says that "To use 
UTF8, you specify using nchar_cs in the argument list".  Does this mean 
that CHR(X) behaves as Tom Lane wants, and NCHR(X) behaves as Albe 
Laurenz wants?  Vice versa?

I'm not saying that Oracle compatibility is paramount.  But if we can 
get compatibility and a reasonable implementation at the same time, that 
seems like a bonus.

Once again, I don't have Oracle installed and cannot test this :(


In response to


pgsql-hackers by date

Next:From: Josh BerkusDate: 2007-04-03 17:04:24
Subject: Re: Implicit casts to text
Previous:From: Zdenek KotalaDate: 2007-04-03 16:39:59
Subject: Re: Questions about pid file creation code

Privacy Policy | About PostgreSQL
Copyright © 1996-2018 The PostgreSQL Global Development Group