From: | Stephen Robert Norris <srn(at)commsecure(dot)com(dot)au> |
---|---|
To: | Joe Conway <mail(at)joeconway(dot)com> |
Cc: | Ivar <ivar(at)lumisoft(dot)ee>, pgsql-general(at)postgresql(dot)org |
Subject: | Re: bytea char escaping |
Date: | 2003-06-25 03:06:39 |
Message-ID: | 1056510399.24406.8.camel@ws12.commsecure.com.au |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-patches |
On Wed, 2003-06-25 at 12:24, Joe Conway wrote:
> 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
Ah, yes. I remember that page. The funny thing about it is that it
doesn't actually say which strings _have_ to be escaped, just gives some
examples...
I always read the Table 5-8 example to indicate that 0-31, 127-255 and \
have to be escaped, but it's not stated anywhere...
Stephen
--
Stephen Robert Norris <srn(at)commsecure(dot)com(dot)au>
CommSecure Australia Pty Ltd
From | Date | Subject | |
---|---|---|---|
Next Message | Joe Conway | 2003-06-25 05:25:21 | Re: bytea char escaping |
Previous Message | Joe Conway | 2003-06-25 02:24:46 | Re: bytea char escaping |
From | Date | Subject | |
---|---|---|---|
Next Message | Rod Taylor | 2003-06-25 03:07:56 | %x, %g warnings |
Previous Message | Joe Conway | 2003-06-25 02:57:00 | Re: [NOVICE] connectby() minor bug in errormessage |