pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: M. Roscio <mroscio@tin.it>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #14346: CREATE TABLE xxx (LIKE yyy INCLUDING ALL) fails
Date: Thu, 29 Sep 2016 10:46:08 -0400
Message-ID: <19359.1475160368@sss.pgh.pa.us> (raw)
In-Reply-To: <57ED252F.2070301@tin.it>
References: <20160929113732.20224.74918@wrigleys.postgresql.org>
	<4645.1475153940@sss.pgh.pa.us>
	<57ED252F.2070301@tin.it>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

"M. Roscio" <mroscio@tin.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


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (4+ messages)

Message-ID: <19359.1475160368@sss.pgh.pa.us>
Permalink:  ../19359.1475160368@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/19359.1475160368@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: tgl@sss.pgh.pa.us, mroscio@tin.it
  Subject: Re: BUG #14346: CREATE TABLE xxx (LIKE yyy INCLUDING ALL) fails
  In-Reply-To: <19359.1475160368@sss.pgh.pa.us>
  References: <20160929113732.20224.74918@wrigleys.postgresql.org> <4645.1475153940@sss.pgh.pa.us> <57ED252F.2070301@tin.it> <19359.1475160368@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox