More newbie question: Restructuring a table

From: Timothy Grant <tjg(at)avalongroup(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: More newbie question: Restructuring a table
Date: 2000-03-01 21:55:06
Message-ID: 38BD91BA.901FB198@exceptionalminds.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)exceptionalminds(dot)com
Red Hat Certified Engineer www.exceptionalminds.com
Avalon Technology Group, Inc. (503) 246-3630
>>>>>>>>>>>>Linux...Because rebooting isn't normal<<<<<<<<<<<<

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Karel Zak - Zakkr 2000-03-01 22:10:30 Re: [GENERAL] More newbie question: Restructuring a table
Previous Message Bruce Momjian 2000-03-01 17:17:08 Re: [GENERAL] psql 7.0.0 beta