More newbie question: Restructuring a table - Mailing list pgsql-general

From Timothy Grant
Subject More newbie question: Restructuring a table
Date
Msg-id 38BD91BA.901FB198@exceptionalminds.com
Whole thread Raw
Responses Re: [GENERAL] More newbie question: Restructuring a table
Re: [GENERAL] More newbie question: Restructuring a table
List pgsql-general
Hi again,

Is there a quick and dirty way that I am missing for creating a new
database with a slightly different schema than the old db?

For example, I have a table with a DATETIME field that I really need to
change to a DATE field.

I can create a new table with that field defined as a DATE, but if I do
the following:

INSERT INTO newtable SELECT * FROM oldtable;

I get an data type error.

Is there a "Standard", quick method for doing something like that?

Thanks much.


--
Stand Fast,
    tjg.

Chief Technology Officer              tjg@exceptionalminds.com
Red Hat Certified Engineer            www.exceptionalminds.com
Avalon Technology Group, Inc.                   (503) 246-3630
>>>>>>>>>>>>Linux...Because rebooting isn't normal<<<<<<<<<<<<

pgsql-general by date:

Previous
From: Bruce Momjian
Date:
Subject: Re: [GENERAL] psql 7.0.0 beta
Next
From: Karel Zak - Zakkr
Date:
Subject: Re: [GENERAL] More newbie question: Restructuring a table