Re: About the CREATE TABLE LIKE indexes vs constraints issue

From: Greg Williamson <gwilliamson39(at)yahoo(dot)com>
To: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: About the CREATE TABLE LIKE indexes vs constraints issue
Date: 2009-12-23 23:59:07
Message-ID: 369353.66686.qm@web46104.mail.sp1.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Andrew Dunstan 2009-12-24 01:30:23 Re: Removing pg_migrator limitations
Previous Message Tom Lane 2009-12-23 23:29:17 Re: About the CREATE TABLE LIKE indexes vs constraints issue