Re: Casting bytea to varchar - Mailing list pgsql-admin

From Albe Laurenz
Subject Re: Casting bytea to varchar
Date
Msg-id A737B7A37273E048B164557ADEF4A58B05799C2A@ntex2010a.host.magwien.gv.at
Whole thread Raw
In response to Re: Casting bytea to varchar  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-admin
Tom Lane wrote:
>> You cannot specify a conversion function while altering
>> a column's type, you'd have to use a new column like this:
>
> Sure you can; that's the whole point of the USING option.
> It'd look something like
>
> ALTER TABLE test ALTER COLUMN val TYPE varchar(255) USING convert(val);

I didn't know that such an option exists.
Thanks for the correction!

Yours,
Laurenz Albe


pgsql-admin by date:

Previous
From: Tom Lane
Date:
Subject: Re: Casting bytea to varchar
Next
From: Phil Monroe
Date:
Subject: Re: Postgres WAL Recovery Fails... And Then Works...