Re: About the CREATE TABLE LIKE indexes vs constraints issue - Mailing list pgsql-hackers

From Greg Williamson
Subject Re: About the CREATE TABLE LIKE indexes vs constraints issue
Date
Msg-id 369353.66686.qm@web46104.mail.sp1.yahoo.com
Whole thread Raw
In response to Re: About the CREATE TABLE LIKE indexes vs constraints issue  (Jeff Davis <pgsql@j-davis.com>)
List 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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: About the CREATE TABLE LIKE indexes vs constraints issue
Next
From: Andrew Dunstan
Date:
Subject: Re: Removing pg_migrator limitations