More newbie question: Restructuring a table

Поиск
Список
Период
Сортировка
От Timothy Grant
Тема More newbie question: Restructuring a table
Дата
Msg-id 38BD91BA.901FB198@exceptionalminds.com
обсуждение исходный текст
Ответы Re: [GENERAL] More newbie question: Restructuring a table  (Karel Zak - Zakkr <zakkr@zf.jcu.cz>)
Re: [GENERAL] More newbie question: Restructuring a table  (Peter Eisentraut <e99re41@DoCS.UU.SE>)
Список 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 по дате отправления:

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: [GENERAL] psql 7.0.0 beta
Следующее
От: Karel Zak - Zakkr
Дата:
Сообщение: Re: [GENERAL] More newbie question: Restructuring a table