BUG #4188: Array field column (varchar[]) cannot be cast to type "text"

Started by Murali Dossalmost 18 years ago2 messagesbugs
Jump to latest
#1Murali Doss
Murali.Doss@mphasis.com

The following bug has been logged online:

Bug reference: 4188
Logged by: Murali Doss
Email address: murali.doss@mphasis.com
PostgreSQL version: 8.2.6
Operating system: Linux
Description: Array field column (varchar[]) cannot be cast to type
"text"
Details:

Dear All,

I have a array field column varchar[] data type and i need to change to text
data type.but it throwing following error

ALTER TABLE mytable ALTER mycolumn TYPE text;

ERROR: column "mycolumn" cannot be cast to type "text"
SQL state: 42804

Please suggest a good solution.

Regards
Murali

#2Heikki Linnakangas
heikki.linnakangas@enterprisedb.com
In reply to: Murali Doss (#1)
Re: BUG #4188: Array field column (varchar[]) cannot be cast to type "text"

Murali Doss wrote:

I have a array field column varchar[] data type and i need to change to text
data type.but it throwing following error

ALTER TABLE mytable ALTER mycolumn TYPE text;

ERROR: column "mycolumn" cannot be cast to type "text"
SQL state: 42804

This is not a bug. Use "ALTER TABLE mytable ALTER mycolumn TYPE text
USING ...".

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com