Altering column type from text to bytea

Поиск
Список
Период
Сортировка
От Alexander Reichstadt
Тема Altering column type from text to bytea
Дата
Msg-id F66DF446-94A9-4FA4-B62A-20A7F10D648F@mac.com
обсуждение исходный текст
Ответы Re: Altering column type from text to bytea  (Alexander Reichstadt <lxr@mac.com>)
Re: Altering column type from text to bytea  (Merlin Moncure <mmoncure@gmail.com>)
Список pgsql-general
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

В списке pgsql-general по дате отправления:

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: [BUGS] Altering a table with a rowtype column
Следующее
От: Alexander Reichstadt
Дата:
Сообщение: Re: Altering column type from text to bytea