From: | Martijn van Oosterhout <kleptog(at)svana(dot)org> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Andrew Dunstan <andrew(at)dunslane(dot)net>, Jeff Davis <pgsql(at)j-davis(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: invalidly encoded strings |
Date: | 2007-09-10 16:25:01 |
Message-ID: | 20070910162501.GG16512@svana.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
On Mon, Sep 10, 2007 at 11:48:29AM -0400, Tom Lane wrote:
> BTW, I'm sure this was discussed but I forgot the conclusion: should
> chr(0) throw an error? If we're trying to get rid of embedded-null
> problems, seems it must.
It is pointed out on wikipedia that Java sometimes uses to byte pair C0
80 to represent the NUL character to allow it to be embedded in C
strings without tripping anything up. It is however technically an
illegal representation (violates the minimal representation rule) and
thus rejected by postgres. I'm not suggesting we copy this, but it does
show there are other ways to deal with this.
Have a nice day,
--
Martijn van Oosterhout <kleptog(at)svana(dot)org> http://svana.org/kleptog/
> From each according to his ability. To each according to his ability to litigate.
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Dunstan | 2007-09-10 16:27:33 | Re: invalidly encoded strings |
Previous Message | Tom Lane | 2007-09-10 16:24:57 | Re: integrated tsearch doesn't work with non utf8 database |
From | Date | Subject | |
---|---|---|---|
Next Message | Andrew Dunstan | 2007-09-10 16:27:33 | Re: invalidly encoded strings |
Previous Message | Tom Lane | 2007-09-10 16:21:02 | Re: invalidly encoded strings |