Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bpcbt-0001MQ-LB for pgsql-bugs@arkaria.postgresql.org; Thu, 29 Sep 2016 14:46:53 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1bpcbs-0002LL-W6 for pgsql-bugs@arkaria.postgresql.org; Thu, 29 Sep 2016 14:46:53 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bpcbE-0001RE-NL for pgsql-bugs@postgresql.org; Thu, 29 Sep 2016 14:46:12 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1bpcbC-0000Rg-2R for pgsql-bugs@postgresql.org; Thu, 29 Sep 2016 14:46:12 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id u8TEk8WW019360; Thu, 29 Sep 2016 10:46:08 -0400 From: Tom Lane To: "M. Roscio" cc: pgsql-bugs@postgresql.org Subject: Re: BUG #14346: CREATE TABLE xxx (LIKE yyy INCLUDING ALL) fails In-reply-to: <57ED252F.2070301@tin.it> References: <20160929113732.20224.74918@wrigleys.postgresql.org> <4645.1475153940@sss.pgh.pa.us> <57ED252F.2070301@tin.it> Comments: In-reply-to "M. Roscio" message dated "Thu, 29 Sep 2016 16:29:03 +0200" Date: Thu, 29 Sep 2016 10:46:08 -0400 Message-ID: <19359.1475160368@sss.pgh.pa.us> X-Pg-Spam-Score: -4.9 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org "M. Roscio" 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