From: | Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> |
---|---|
To: | Marko Kreen <marko(at)l-t(dot)ee> |
Cc: | Joe Conway <joseph(dot)conway(at)home(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-patches(at)postgresql(dot)org |
Subject: | Re: Bytea string operator support |
Date: | 2001-09-06 17:43:53 |
Message-ID: | 200109061743.f86Hhrh05987@candle.pha.pa.us |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-patches |
> On Wed, Sep 05, 2001 at 01:34:06PM -0700, Joe Conway wrote:
> > > Why not just stick these things into encode() and name them
> > > "my-cool-encoding" or whatever. There is no truly natural conversion
> > > between text and bytea, so encode/decode seem like the proper place.
> >
> > Here's a patch for bytea string functions. As discussed:
> >
> > text encode(bytea, 'escape')
> > bytea decode(text, 'escape')
>
> Why are you using \xxx encoding there? As the 'escape' encoding
> is supposed to be 'minimalistic' as it escapes only 2
> problematic values, then IMHO it would be better to use
> \0 and \\ as escapes - takes less room.
Agreed, and I have documented this in the SGML pages. Knowing this,
bytea becomes a much easier format to use.
--
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
From | Date | Subject | |
---|---|---|---|
Next Message | Marc G. Fournier | 2001-09-06 17:52:39 | Some changes to CVSup and AnonCVS access ... |
Previous Message | Peter Eisentraut | 2001-09-06 17:43:23 | Re: [GENERAL] Bug in createlang? |
From | Date | Subject | |
---|---|---|---|
Next Message | Joe Conway | 2001-09-06 18:08:26 | Re: Bytea string operator support |
Previous Message | Peter Eisentraut | 2001-09-06 17:43:23 | Re: [GENERAL] Bug in createlang? |