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.
regards, tom lane