From: | Lennin Caro <lennin(dot)caro(at)yahoo(dot)com> |
---|---|
To: | Rotvic Celaya Rosas <torvictor1(at)gmail(dot)com>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
Cc: | pgsql-es-ayuda(at)postgresql(dot)org |
Subject: | Re: Problema Tipo de datos |
Date: | 2009-08-05 21:31:05 |
Message-ID: | 192858.94561.qm@web59507.mail.ac4.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-es-ayuda |
> From: Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>
> Subject: Re: [pgsql-es-ayuda] Problema Tipo de datos
> To: "Rotvic Celaya Rosas" <torvictor1(at)gmail(dot)com>
> Cc: pgsql-es-ayuda(at)postgresql(dot)org
> 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
From | Date | Subject | |
---|---|---|---|
Next Message | Crispin T. | 2009-08-06 02:56:12 | Re: comportamiento desconocido de current_time |
Previous Message | Eduardo Bieñkowski | 2009-08-05 20:20:04 | Re: Problema Tipo de datos |