Re: JDBC 'Unterminated quoted string'

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Grant Finnemore <gaf(at)ucs(dot)co(dot)za>
Cc: Peter Mount <petermount(at)maidstone(dot)gov(dot)uk>, Interfaces <pgsql-interfaces(at)postgresql(dot)org>
Subject: Re: JDBC 'Unterminated quoted string'
Date: 2000-11-10 14:54:43
Message-ID: 11184.973868083@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

Grant Finnemore <gaf(at)ucs(dot)co(dot)za> writes:
> In brief, there seems to be some problem at the backend inserting a
> \0.

char(n) does not support embedded nulls. Offhand I believe that bytea
is the only datatype that does, and even then you have to write 'em
with a backslash-escape --- ie, send "\000" not an actual null.

Fixing this is not likely to happen soon, if ever, because it would
involve a massive overhaul of the datatype I/O system, with such
side-effects as breaking every user-defined datatype in existence.
Textual representations of datatypes are C strings --- ie,
null-terminated --- and all datatype I/O routines depend on that.

regards, tom lane

In response to

Browse pgsql-interfaces by date

  From Date Subject
Next Message Jamie Walker 2000-11-10 17:18:37 Re: Access 2000 and empty fields
Previous Message Peter Mount 2000-11-10 14:54:38 RE: JDBC 'Unterminated quoted string'