pg.ddx.io pgsql-sql@postgresql.org mailing list archive
help / color / mirror / Atom feedcannot alter column data type to "date"
2+ messages / 2 participants
[nested] [flat]
* cannot alter column data type to "date"
@ 2005-12-08 07:12 Noel Doydora <uwq291@lycos.com>
2005-12-08 07:21 ` Re: cannot alter column data type to "date" Michael Fuhr <mike@fuhr.org>
0 siblings, 1 reply; 2+ messages in thread
From: Noel Doydora @ 2005-12-08 07:12 UTC (permalink / raw)
To: pgsql-sql
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?
Hoping for a kind response. Thank you.
SQL error:
ERROR: column "date_signed" cannot be cast to type "date"
In statement:
ALTER TABLE "canvass" ALTER COLUMN "date_signed" TYPE date
--
_______________________________________________
Search for businesses by name, location, or phone number. -Lycos Yellow Pages
http://r.lycos.com/r/yp_emailfooter/http://yellowpages.lycos.com/default.asp?SRC=lycos10
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: cannot alter column data type to "date"
2005-12-08 07:12 cannot alter column data type to "date" Noel Doydora <uwq291@lycos.com>
@ 2005-12-08 07:21 ` Michael Fuhr <mike@fuhr.org>
0 siblings, 0 replies; 2+ messages in thread
From: Michael Fuhr @ 2005-12-08 07:21 UTC (permalink / raw)
To: Noel Doydora <uwq291@lycos.com>; +Cc: 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
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2005-12-08 07:21 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-12-08 07:12 cannot alter column data type to "date" Noel Doydora <uwq291@lycos.com>
2005-12-08 07:21 ` Michael Fuhr <mike@fuhr.org>
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