Re: PQescapeBytea is not multibyte aware

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Joe Conway <mail(at)joeconway(dot)com>
Cc: Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>, pgsql-hackers(at)postgresql(dot)org, Thomas Lockhart <lockhart(at)fourpalms(dot)org>
Subject: Re: PQescapeBytea is not multibyte aware
Date: 2002-04-05 22:10:38
Message-ID: 10498.1018044638@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

Joe Conway <mail(at)joeconway(dot)com> writes:
>> This scenario is probably why Tatsuo wants PQescapeBytea to octalize
>> everything with the high bit set; I'm not sure there's any lesser way

> Yuck! At that point you're no better off than converting to hex (and
> worse off than converting to base64) for storage.

No; the *storage* is still compact, it's just the I/O representation
that's not.

> SQL99 actually defines BLOB as a binary string literal comprised of an
> even number of hexadecimal digits, in single quotes, preceded by "X",
> e.g. X'1a43fe'. Should we be looking at implementing the standard
> instead of, or in addition to, octalizing?

Perhaps we should cause the system to regard hex-strings as literals of
type bytea. Right now I think they're taken to be integer constants,
which is clearly not per spec.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jon Grov 2002-04-05 22:24:49 Re: Suggestion for optimization
Previous Message Joe Conway 2002-04-05 21:53:47 Re: PQescapeBytea is not multibyte aware

Browse pgsql-patches by date

  From Date Subject
Next Message Josh Berkus 2002-04-05 22:29:14 Re: 16 parameter limit
Previous Message Joe Conway 2002-04-05 21:53:47 Re: PQescapeBytea is not multibyte aware