pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Michael Fuhr <mike@fuhr.org>
To: Noel Doydora <uwq291@lycos.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: cannot alter column data type to "date"
Date: Thu, 8 Dec 2005 00:21:45 -0700
Message-ID: <20051208072145.GA6671@winnie.fuhr.org> (raw)
In-Reply-To: <20051208071207.43903CA07E@ws7-4.us4.outblaze.com>
References: <20051208071207.43903CA07E@ws7-4.us4.outblaze.com>

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



view thread (2+ messages)

Message-ID: <20051208072145.GA6671@winnie.fuhr.org>
Permalink:  ../20051208072145.GA6671@winnie.fuhr.org/
Also on:    postgresql.org/message-id/20051208072145.GA6671@winnie.fuhr.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: mike@fuhr.org, uwq291@lycos.com
  Subject: Re: cannot alter column data type to "date"
  In-Reply-To: <20051208072145.GA6671@winnie.fuhr.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox