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

Re: Bytea string operator support

From: Marko Kreen <marko(at)l-t(dot)ee>
To: Joe Conway <joseph(dot)conway(at)home(dot)com>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, pgsql-patches(at)postgresql(dot)org
Subject: Re: Bytea string operator support
Date: 2001-09-06 17:39:49
Message-ID: 20010906193949.A9357@l-t.ee (view raw or flat)
Thread:
Lists: pgsql-hackerspgsql-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.


-- 
marko


In response to

Responses

pgsql-hackers by date

Next:From: Peter EisentrautDate: 2001-09-06 17:43:23
Subject: Re: [GENERAL] Bug in createlang?
Previous:From: Bruce MomjianDate: 2001-09-06 17:13:50
Subject: Re: TRUNCATE question

pgsql-patches by date

Next:From: Peter EisentrautDate: 2001-09-06 17:43:23
Subject: Re: [GENERAL] Bug in createlang?
Previous:From: Rene PijlmanDate: 2001-09-06 17:04:59
Subject: Re: JDBC patch procedures (Re: [PATCHES] Patch for jdbc2 ResultSet.java)

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