Re: byteain bug(?)

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: Joe Conway <joseph(dot)conway(at)home(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: byteain bug(?)
Date: 2001-09-07 14:25:57
Message-ID: 200109071425.f87EPvx19310@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
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').

Very good point.

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Larry Rosenman 2001-09-07 14:28:59 Re: Beta Monday?
Previous Message Bruce Momjian 2001-09-07 14:17:54 Re: Beta Monday?