Re: BUG #14346: CREATE TABLE xxx (LIKE yyy INCLUDING ALL) fails

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "M(dot) Roscio" <mroscio(at)tin(dot)it>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: BUG #14346: CREATE TABLE xxx (LIKE yyy INCLUDING ALL) fails
Date: 2016-09-29 14:46:08
Message-ID: 19359.1475160368@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

"M. Roscio" <mroscio(at)tin(dot)it> writes:
> However I insist about foreign keys: source table is present with 13
> rows in information_schema.key_column_usage,
> while destination table only has one.

LIKE is not documented as copying foreign key constraints, regardless
of whether there's a primary key or not. INCLUDING CONSTRAINTS
is specifically stated to control CHECK constraints only.

regards, tom lane

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message huang 2016-09-29 14:48:14 Re: vacuumdb parallel has a deadlock detected in 9.5.4
Previous Message Alvaro Herrera 2016-09-29 14:34:10 Re: BUG #14243: pg_basebackup failes by a STATUS_DELETE_PENDING file