Skip site navigation (1) Skip section navigation (2)

Re: byteain bug(?)

From: "Joe Conway" <joseph(dot)conway(at)home(dot)com>
To: "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: byteain bug(?)
Date: 2001-09-07 05:52:14
Message-ID: 02a501c13761$3edada10$0705a8c0@jecw2k1 (view raw or flat)
Thread:
Lists: pgsql-hackers
> > > > It checks for a '\' followed by three digits, but does not attempt
to
> > > > enforce that the three digits actually produce a valid octal number.
> > Anyone
> > > > object to me fixing this?
> > > >
> >
> > Based on the thread this morning on patches, I was thinking we should
allow
> > '\\', '\0', or '\###' where ### is any valid octal. At least that's what
I
> > was going to have decode(bytea, 'escape') handle.
>
> Yep, it is way too open right now.

On further thought, I think I'll have to not allow '\0' and require '\000'
instead. Otherwise, how should the following be interpreted:

'\0123'

Is that '\0' followed by the literals '1', '2', and '3'? Or is it '\012'
followed by the literal '3'?

So, I'll go with '\\' or '\###' where ### is any valid octal, for both
byteain and decode(bytea, 'escape').

Comments?

-- Joe




In response to

Responses

pgsql-hackers by date

Next:From: Barry LindDate: 2001-09-07 06:39:53
Subject: Re: [HACKERS] JDBC pg_description update needed for CVS tip
Previous:From: Tom LaneDate: 2001-09-07 05:34:46
Subject: Re: [HACKERS] JDBC pg_description update needed for CVS tip

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group