Re: [PATCH] by request: base64 for bytea

From: Marko Kreen <marko(at)l-t(dot)ee>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alex Pilosov <alex(at)pilosoft(dot)com>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: [PATCH] by request: base64 for bytea
Date: 2001-06-24 10:33:31
Message-ID: 20010624123330.A28320@l-t.ee
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Jun 23, 2001 at 10:46:46PM -0400, Tom Lane wrote:
> Marko Kreen <marko(at)l-t(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Larry Rosenman 2001-06-24 11:05:29 Re: Why would this use 600Meg of VM?
Previous Message Bernardo Pons 2001-06-24 10:05:13 RE: Extracting metadata about attributes from catalog