altering the datatype of a column.

From: Prabu Subroto <prabu_subroto(at)yahoo(dot)com>
To: Postgres General Milis <pgsql-general(at)postgresql(dot)org>
Subject: altering the datatype of a column.
Date: 2004-08-04 17:47:26
Message-ID: 20040804174726.84664.qmail@web41804.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Dear my friends...

I want to change the datatype of a completed table
(has had already content).
But I don't know how.
Here is my try:
"
kv=# alter table customer alter column address set
type char(150);
ERROR: syntax error at or near "type" at character 47
kv=# alter table customer alter column address set
datatype char(150);
ERROR: syntax error at or near "datatype" at
character 47
kv=#
"

Please tell me how.

If I alter the datatype of the field, am I going to
loose the data inside the column?

Thank you very much in advance.



__________________________________
Do you Yahoo!?
New and Improved Yahoo! Mail - 100MB free storage!
http://promotions.yahoo.com/new_mail

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Doug McNaught 2004-08-04 17:51:07 Re: COPY not handling BLOBs
Previous Message Jim C. Nasby 2004-08-04 17:41:30 Re: Casting timestamp with time zone to varchar automatically