> From: Alvaro Herrera <[email protected]>
> Subject: Re: [pgsql-es-ayuda] Problema Tipo de datos
> To: "Rotvic Celaya Rosas" <[email protected]>
> Cc: [email protected]
> Date: Wednesday, August 5, 2009, 5:29 PM
> Rotvic Celaya Rosas escribió:
> > Tengo el siguiente problema lista:
> > 
> > Estoy intentanto cambiar un tipo de dato en una tabla,
> el tipo original es
> > character(2) y quiero cambiarlo a smallint, al hacerlo
> me marca un error, no
> > me deja cambiarlo de tipo, que me recomiendan hacer
> 
> ALTER TABLE TYPE debería servir, pero probablemente
> necesitas darle un
> USING.  ¿Cuál es el error que te da?
> 
> -- 
> Alvaro Herrera           
>              http://www.flickr.com/photos/alvherre/
> "We are who we choose to be", sang the goldfinch
> when the sun is high (Sandman)
> --
> TIP 7: no olvides aumentar la configuración del "free
> space map"
>

Intenta esto

alter table p1 ALTER column val1 TYPE int using val1::integer


     
--
TIP 9: visita nuestro canal de IRC #postgresql-es en irc.freenode.net

Responder a