Skip site navigation (1) Skip section navigation (2)

CREATE TABLE LIKE, regarding constraints

From: <david(dot)sahagian(at)emc(dot)com>
To: <pgsql-docs(at)postgresql(dot)org>
Subject: CREATE TABLE LIKE, regarding constraints
Date: 2011-12-30 21:27:21
Message-ID: F3CBFBA88397EA498B22A05FFA9EC49D60A4123A@MX22A.corp.emc.com (view raw or flat)
Thread:
Lists: pgsql-docs
www.postgresql.org/docs/9.0/static/sql-createtable.html
== == == == ==
LIKE parent_table [ like_option ... ]
. . .
Not-null constraints are always copied to the new table.
CHECK constraints will only be copied if INCLUDING CONSTRAINTS is specified; other types of constraints will never be copied.
. . .
== == == == ==

But I do see PK and UNIQUE constraints
  CONSTRAINT blah_pkey PRIMARY KEY (id),
  CONSTRAINT blah_host_id_key UNIQUE (host_id)
in the def of the new table.


Also, why is there no discussion of what "EXCLUDING CONSTRAINTS" will result in ?

Thanks,
-dvs-



Responses

pgsql-docs by date

Next:From: Magnus HaganderDate: 2011-12-31 12:42:12
Subject: Re: CREATE TABLE LIKE, regarding constraints
Previous:From: Alvaro HerreraDate: 2011-12-26 22:11:48
Subject: Re: small mvcc.sqml improvents

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group