Casting bytea to varchar

From: "Rajagopalan, Jayashree" <Jayashree(dot)Rajagopalan(at)emc(dot)com>
To: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Casting bytea to varchar
Date: 2013-01-15 05:11:36
Message-ID: 672B315321EBEC4CA4B5627D112E0896067F86D01E@MX25A.corp.emc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Hi:

I'm relatively new to postgres:

I've to alter a column which is of datatype bytea to varchar(255).

I used this:
ALTER TABLE tablename ALTER COLUMN columname TYPE varchar(255);

But I'm really not sure, if the value is casted properly.
Is there a way to explicity to cast the value, while altering a columns.

Example sql are welcome.

Thanks
Jayashree

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Vinod V 2013-01-15 06:23:37 Need assistance in incremental backup for my environment
Previous Message KONDO Mitsumasa 2013-01-15 01:08:16 Re: Postgres WAL Recovery Fails... And Then Works...