Re: bytea char escaping

From: Stephen Robert Norris <srn(at)commsecure(dot)com(dot)au>
To: Ivar <ivar(at)lumisoft(dot)ee>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: bytea char escaping
Date: 2003-06-25 01:47:33
Message-ID: 1056505653.24406.5.camel@ws12.commsecure.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-patches

On Tue, 2003-06-24 at 22:42, Ivar wrote:
> Hi,
>
> What chars must be escaped in string and how exactly?
>
> LF -> \\n
> CR -> \\r

>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.

Stephen
--
Stephen Robert Norris <srn(at)commsecure(dot)com(dot)au>
CommSecure Australia Pty Ltd

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Joe Conway 2003-06-25 02:24:46 Re: bytea char escaping
Previous Message Bruce Momjian 2003-06-25 01:19:00 Re: PlPython

Browse pgsql-patches by date

  From Date Subject
Next Message Rod Taylor 2003-06-25 02:06:04 Doc build broken
Previous Message Bruce Momjian 2003-06-25 01:20:56 Re: pg_hba.conf CIDR mask doc patch