| From: | Albe Laurenz <laurenz(dot)albe(at)wien(dot)gv(dot)at> |
|---|---|
| To: | "Tom Lane *EXTERN*" <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
| Cc: | "Rajagopalan, Jayashree *EXTERN*" <Jayashree(dot)Rajagopalan(at)emc(dot)com>, "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org> |
| Subject: | Re: Casting bytea to varchar |
| Date: | 2013-01-15 15:56:30 |
| Message-ID: | A737B7A37273E048B164557ADEF4A58B05799C2A@ntex2010a.host.magwien.gv.at |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Phil Monroe | 2013-01-15 18:33:42 | Re: Postgres WAL Recovery Fails... And Then Works... |
| Previous Message | Tom Lane | 2013-01-15 15:40:00 | Re: Casting bytea to varchar |