Fwd: Re: data type change

From: Aarni Ruuhimäki <aarni(dot)ruuhimaki(at)kymi(dot)com>
To: renzo rizzato <renzorizzato(at)iol(dot)it>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Fwd: Re: data type change
Date: 2003-01-06 13:12:09
Message-ID: 200301061512.09746.aarni.ruuhimaki@kymi.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi !

Or you can take a dump -c, edit the dump file's appropriate CREATE statement
for your table and column and just read the data back in.

BR,

aarni

---------- Forwarded Message ----------

Subject: Re: [NOVICE] data type change
Date: Mon, 6 Jan 2003 13:48:16 +0100
From: Alberto Bolchini <alberto(at)melloni49(dot)it>
To: postgresql novice <pgsql-novice(at)postgresql(dot)org>
Cc: renzo rizzato <renzorizzato(at)iol(dot)it>

<quote who="renzo rizzato">

> does anybody know if any sql instruction exists to allow
> change of a column data type? In my case I need to convert a
> money type into numeric without any success.

AFAIK you cannot in Postgresql. I suggest you recreate the table with the
correct column datatypes (i.e. rename the table, create the new table and
populate it with values from the original table.) Watch out for triggers and
procedures.

Regards,

Alberto.

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html

-------------------------------------------------------

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message cristi 2003-01-06 13:50:03 Sorry, to many clients already.
Previous Message Alberto Bolchini 2003-01-06 12:48:16 Re: data type change