Re: About the CREATE TABLE LIKE indexes vs constraints issue

Поиск
Список
Период
Сортировка
От Greg Williamson
Тема Re: About the CREATE TABLE LIKE indexes vs constraints issue
Дата
Msg-id 369353.66686.qm@web46104.mail.sp1.yahoo.com
обсуждение исходный текст
Ответ на Re: About the CREATE TABLE LIKE indexes vs constraints issue  (Jeff Davis <pgsql@j-davis.com>)
Список pgsql-hackers
Jeff Davis wrote:

...
> Honestly, I've never used LIKE in a table definition aside from one-off

> design experiments. For that kind of thing, what I want is to just get
> everything (except perhaps FKs if the above situation applies), and I
> adjust it from there. Are there people out there who use LIKE in their
> production schema files?

I for one never have either. If I needed such a thing I'd go through the steps
of using pg_dump to get the structure, edit the result to get my new table's 
name and structure, and then use that SQL to create the table and add
it to the CVS so I would have a record of it if I ever needed to refer to
it later (when did I do this?) or if I needed to recreate the scheme because
of a crash or whatever. Too easy to make new table with LIKE and not
have the proper record of how to recreate the changes, IMHO. (Of course
you could capture the SQL w/ history and use that.)

Greg W.


     


В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: About the CREATE TABLE LIKE indexes vs constraints issue
Следующее
От: Andrew Dunstan
Дата:
Сообщение: Re: Removing pg_migrator limitations