Re: Altering column type from text to bytea - Mailing list pgsql-general

From Merlin Moncure
Subject Re: Altering column type from text to bytea
Date
Msg-id CAHyXU0xxCe8QUB3xNTS5aFKHLtigZCXQVu1KoXcm9_z86jp6qA@mail.gmail.com
Whole thread Raw
In response to Altering column type from text to bytea  (Alexander Reichstadt <lxr@mac.com>)
List pgsql-general
On Wed, Mar 21, 2012 at 2:56 PM, Alexander Reichstadt <lxr@mac.com> wrote:
Hi,

when trying to change a text column to bytea I am getting the following error:

SQL error:

ERROR:  column "comment" cannot be cast to type bytea

In statement:
ALTER TABLE "public"."persons" ALTER COLUMN "comment" TYPE bytea


TRY ALTER TYPE ...USING using either direct cast or encode() function.

Please don't post emails in HTML format, thanks!

merlin

pgsql-general by date:

Previous
From: Martijn van Oosterhout
Date:
Subject: Re: Large Databases redux
Next
From: Rory Campbell-Lange
Date:
Subject: Server choice for small workload : raptors or SSD?