How to cast VARCHAR to BYTEA and vice-versa? - Mailing list pgsql-hackers

From Moran.Michael
Subject How to cast VARCHAR to BYTEA and vice-versa?
Date
Msg-id B27C8914860EE24E865D189A3735EA53100920@lasexch03.is.ad.igt.com
Whole thread Raw
Responses Re: How to cast VARCHAR to BYTEA and vice-versa?
List pgsql-hackers
Hello all,
I have a table with a VARCHAR column that I need to convert to a BYTEA.
How do I cast VARCHAR to BYTEA?
The following doesn't seem to work as it yields the 'cannot cast varchar to
bytea' error message:   varchar_data::bytea
On the same topic, how do I do the reverse, that is, how to I cast from
BYTEA back to VARCHAR?
Thanks,
-Michael Moran


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: ERROR: unrecognized node type in PostgresMain( )
Next
From: Tom Lane
Date:
Subject: Re: How to cast VARCHAR to BYTEA and vice-versa?