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