Lists: | pgsql-novice |
---|
From: | manaus <s_incocciati(at)hotmail(dot)com> |
---|---|
To: | pgsql-novice(at)postgresql(dot)org |
Subject: | type conversion |
Date: | 2009-09-13 17:31:19 |
Message-ID: | h8ja94$jsh$1@ger.gmane.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-novice |
hello,
I created a table with integer instead of boolean, but now I need to
change it. PdAdmin wont let me do it. Should I drop the (empty) table
and start again?
Thanks
From: | John DeSoi <desoi(at)pgedit(dot)com> |
---|---|
To: | manaus <s_incocciati(at)hotmail(dot)com> |
Cc: | pgsql-novice(at)postgresql(dot)org |
Subject: | Re: type conversion |
Date: | 2009-09-14 13:54:04 |
Message-ID: | B8AA483B-D4DE-4A76-97C0-B95AC246D373@pgedit.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Lists: | pgsql-novice |
On Sep 13, 2009, at 1:31 PM, manaus wrote:
> I created a table with integer instead of boolean, but now I need to
> change it. PdAdmin wont let me do it. Should I drop the (empty)
> table and start again?
See the SQL command ALTER TABLE and read the section on ALTER
[ COLUMN ] column [ SET DATA ] TYPE type [ USING expression ].
http://www.postgresql.org/docs/8.4/interactive/sql-altertable.html
John DeSoi, Ph.D.