[GENERAL] Cast text to bytea

2003-12-03 Thread Alvar Freude
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, I want to change a column from text to bytea; since it seems that alter table can't change the column type, i have to add a temporary column and copy the data from the old one to the new, delete the old and rename the new. But it seems that

Re: [GENERAL] Cast text to bytea

2003-12-03 Thread Alvar Freude
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi, - -- Alvar Freude [EMAIL PROTECTED] wrote: But it seems that Postgres can't cast text to bytea: odem= UPDATE forum_gtree SET gid2=gid::bytea; ERROR: Cannot cast type text to bytea I tryed it with DECODE: odem= UPDATE forum_gtree SET