I'm trying to change the geocode column data type of my geometry table from
varchar to integer to improve the performance. Anyone can help me with that?
I tryed to do a cast:
ALTER TABLE mu ADD COLUMN codigo2 int4;
UPDATE mu SET codigo2 = CAST(codigo AS int4);
ALTER TABLE mu DROP COLUMN codigo;
but postgre returns the error message:
ERROR: Cannot cast type character varying to integer