Re: [PATCH] by request: base64 for bytea - Mailing list pgsql-hackers

From Marko Kreen
Subject Re: [PATCH] by request: base64 for bytea
Date
Msg-id 20010624123330.A28320@l-t.ee
Whole thread Raw
In response to Re: [PATCH] by request: base64 for bytea  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [PATCH] by request: base64 for bytea  (Alex Pilosov <alex@pilosoft.com>)
Re: [PATCH] by request: base64 for bytea  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Sat, Jun 23, 2001 at 10:46:46PM -0400, Tom Lane wrote:
> Marko Kreen <marko@l-t.ee> writes:
> > Question to -hackers: currently there is not possible to cast
> > bytea to text and vice-versa.  Is this intentional or bug?
> 
> Intentional.  text and friends do not like embedded nulls.
> 
> If there were a cast it would have to be one that implies
> an I/O conversion, just like any other type that contains
> non-textual data.

Well, I have functions that should work on both - encode(),
digest(), hmac().  Probably should do then several entries.  Ok.

But what should be return type of decrypt()?  I imagine well
situations where user wants to crypt both bytea and text data.
When there is even not a way to cast them to each other, then
he is stuck for no good reason.

-- 
marko



pgsql-hackers by date:

Previous
From: "Bernardo Pons"
Date:
Subject: RE: Extracting metadata about attributes from catalog
Next
From: Larry Rosenman
Date:
Subject: Re: Why would this use 600Meg of VM?