Re: bytea char escaping

From: Joe Conway <mail(at)joeconway(dot)com>
To: Stephen Robert Norris <srn(at)commsecure(dot)com(dot)au>
Cc: Ivar <ivar(at)lumisoft(dot)ee>, pgsql-general(at)postgresql(dot)org
Subject: Re: bytea char escaping
Date: 2003-06-25 02:24:46
Message-ID: 3EF907EE.9020100@joeconway.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-patches

Stephen Robert Norris wrote:
> On Tue, 2003-06-24 at 22:42, Ivar wrote:
>>What chars must be escaped in string and how exactly?
>>From memory, you have to escape \ -> \\, ' -> \' and I think NULL to
> \\000. I have a feeling that you need to escape all the non-printable
> characters to \xxx escape codes, but I may be wrong there.
>
> I've just looked at my code to do all this, and I'm ashamed to say I
> can't really work out what it escapes. Must document better.

See:
http://www.postgresql.org/docs/view.php?version=7.3&idoc=0&file=datatype-binary.html

HTH,

Joe

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Stephen Robert Norris 2003-06-25 03:06:39 Re: bytea char escaping
Previous Message Stephen Robert Norris 2003-06-25 01:47:33 Re: bytea char escaping

Browse pgsql-patches by date

  From Date Subject
Next Message Joe Conway 2003-06-25 02:37:44 Re: connectby() minor bug in errormessage
Previous Message Bruce Momjian 2003-06-25 02:07:43 Re: Doc build broken