From: | Alexander Reichstadt <lxr(at)mac(dot)com> |
---|---|
To: | pgsql-general(at)postgresql(dot)org |
Subject: | Re: Altering column type from text to bytea |
Date: | 2012-03-21 20:02:25 |
Message-ID: | 42C685A9-8322-41AD-99F4-998AE0759F9B@mac.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general |
I just found a thread that outlines this issue and how to solve it here:
<http://archives.postgresql.org/pgsql-general/2005-12/msg01322.php>
Thanks
Alex
Am 21.03.2012 um 20:56 schrieb Alexander Reichstadt:
> 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
>
>
> I found that others had the same issue but I found no solution for it. I made a test-table and though it was empty meaning the column of concern had only NULL values I got the same error when trying to change that text column to type bytea.
>
> Is it possible to change column types later on to bytea?
>
> Thanks
> Alex
From | Date | Subject | |
---|---|---|---|
Next Message | John R Pierce | 2012-03-21 20:06:51 | Re: Large PostgreSQL servers |
Previous Message | Robert Haas | 2012-03-21 19:57:45 | Re: [GENERAL] Altering a table with a rowtype column |