changing varchar to int - Mailing list pgsql-admin

From Ankur Kaushik
Subject changing varchar to int
Date
Msg-id CALXoLqyfmWre=DC3yifOUJPtUK4vV+7LDSZzHk6ocZP1rv3rsg@mail.gmail.com
Whole thread Raw
Responses Re: changing varchar to int
List pgsql-admin
Original column



Column                   Type                                 Modifiers
model                | character varying(50)       | default NULL::character varying


Required Column

Model                   integer


=========
ALTER TABLE device ALTER COLUMN model TYPE integer USING (model::integer);


getting below error

ERROR:  default for column "model" cannot be cast automatically to type integer

pgsql-admin by date:

Previous
From: Ankur Kaushik
Date:
Subject: changing varchar to int
Next
From: Ian Barwick
Date:
Subject: Re: changing varchar to int