Ken Johanson wrote:
> At least on other servers/drivers I believe nulls are supported (and
> should be according to some spec) (The only special-meaning char is
> single quote).
The driver can't do anything about it, it's a server issue. I can think
of some ways the server could support it without extensive changes ..
e.g. use a "modified UTF8" representation which stores \u0000 as 0xc0
0x80 internally .. but you'd have to take that up with the backend
> I'm wondering how the binary protocol works insofar as handling the NULL
> byte; does it precede it with a backslash?
The driver sends string parameters out-of-line without escaping (i.e.
length field, then raw utf-8 data). The error you see is generated when
the server notices that there's a \u0000 there; it rejects the string
entirely rather than silently mangling it.
In response to
pgsql-admin by date
|Next:||From: Doug Knight||Date: 2007-02-22 14:24:59|
|Subject: UIDs/GIDs for hacluster and haclient|
|Previous:||From: Andy Shellam (Mailing Lists)||Date: 2007-02-22 08:43:13|
|Subject: Re: [pgadmin-support] UNSUBSCRIBE|
pgsql-jdbc by date
|Next:||From: Heikki Linnakangas||Date: 2007-02-22 10:58:03|
|Subject: Re: Class Cast Exception for DataSource|
|Previous:||From: Ken Johanson||Date: 2007-02-22 06:37:51|
|Subject: Re: invalid byte sequence for encoding "UTF8": 0x00|