| 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: | 46128474.5000507@markdilger.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| 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 
CHR(X USING NCHAR_CS).
On http://www.oraclehome.co.uk/chr-function.htm 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 :(
mark
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Josh Berkus | 2007-04-03 17:04:24 | Re: Implicit casts to text | 
| Previous Message | Zdenek Kotala | 2007-04-03 16:39:59 | Re: Questions about pid file creation code |