Re: cannot alter column data type to "date"

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Noel Doydora <uwq291(at)lycos(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: cannot alter column data type to "date"
Date: 2005-12-08 07:21:45
Message-ID: 20051208072145.GA6671@winnie.fuhr.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

On Thu, Dec 08, 2005 at 03:12:07PM +0800, Noel Doydora wrote:
> Below is the message I receive when I try to alter the data type of
> a column to "date". I had to drop the column and add it again just
> so I can set its data type to "date". How do I change a column's
> data type to "date" without dropping and then creating it again?

See the USING clause in the ALTER TABLE documentation:

http://www.postgresql.org/docs/8.0/interactive/sql-altertable.html

--
Michael Fuhr

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Peter Eisentraut 2005-12-08 08:21:49 Re: Locale and pattern matching
Previous Message Noel Doydora 2005-12-08 07:12:07 cannot alter column data type to "date"