Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id 230E07E7FA8 for ; Sun, 11 Dec 2011 20:46:33 -0400 (AST) Received: from mail-qw0-f53.google.com ([209.85.216.53]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RZu2K-0007OH-GI for pgsql-hackers@postgresql.org; Mon, 12 Dec 2011 00:46:32 +0000 Received: by qadb15 with SMTP id b15so4239447qad.19 for ; Sun, 11 Dec 2011 16:46:19 -0800 (PST) Received: by 10.224.95.211 with SMTP id e19mr15498489qan.34.1323650779797; Sun, 11 Dec 2011 16:46:19 -0800 (PST) Received: from tornado.leadboat.com (ip68-230-222-48.rd.hr.cox.net. [68.230.222.48]) by mx.google.com with ESMTPS id dm3sm33326771qab.12.2011.12.11.16.46.18 (version=SSLv3 cipher=OTHER); Sun, 11 Dec 2011 16:46:19 -0800 (PST) Date: Sun, 11 Dec 2011 19:46:17 -0500 From: Noah Misch To: Tom Lane Cc: Gabriele Bartolini , PostgreSQL-development , Marco Nenciarini Subject: Re: [PATCH] Support for foreign keys with arrays Message-ID: <20111212004617.GC10399@tornado.leadboat.com> References: <4EB3DF02.4020604@2ndQuadrant.it> <20111117042841.GA20517@tornado.leadboat.com> <1652.1321506512@sss.pgh.pa.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1652.1321506512@sss.pgh.pa.us> User-Agent: Mutt/1.5.18 (2008-05-17) X-Pg-Spam-Score: -2.6 (--) X-Archive-Number: 201112/428 X-Sequence-Number: 199680 On Thu, Nov 17, 2011 at 12:08:32AM -0500, Tom Lane wrote: > The least we could do is invent some non-spec syntax that makes the > intention clear, rather than having the system assume that an error case > was intended to mean something else. Maybe > > pids INTEGER[] ARRAY REFERENCES pt, +1. Perhaps this for the table_constraint syntax: FOREIGN KEY (ARRAY foo, bar, ARRAY pids) REFERENCES pt