Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1aghR4-0007eM-Et for pgsql-bugs@arkaria.postgresql.org; Thu, 17 Mar 2016 23:34:34 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1aghR3-0000yO-TK for pgsql-bugs@arkaria.postgresql.org; Thu, 17 Mar 2016 23:34:33 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1aghQR-0000FC-0y for pgsql-bugs@postgresql.org; Thu, 17 Mar 2016 23:33:55 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1aghQO-0007tq-Fb for pgsql-bugs@postgresql.org; Thu, 17 Mar 2016 23:33:53 +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 u2HNXlGn016651; Thu, 17 Mar 2016 19:33:47 -0400 From: Tom Lane To: jan.kort@genetics.nl cc: pgsql-bugs@postgresql.org Subject: Re: BUG #14025: Unable to validate constraints In-reply-to: <20160316150811.5173.29176@wrigleys.postgresql.org> References: <20160316150811.5173.29176@wrigleys.postgresql.org> Comments: In-reply-to jan.kort@genetics.nl message dated "Wed, 16 Mar 2016 15:08:11 -0000" Date: Thu, 17 Mar 2016 19:33:47 -0400 Message-ID: <16650.1458257627@sss.pgh.pa.us> X-Pg-Spam-Score: -1.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 jan.kort@genetics.nl writes: > When I do: > - disable trigger all > - incorrect foreign key reference > - enable trigger all > - validate > Then I get no error, I was expecting an error. AFAIK, disabling a foreign key trigger is not supported; if you do it, we give absolutely zero guarantees about the subsequent behavior of the foreign key. ALTER TABLE VALIDATE CONSTRAINT is not meant to fix that. It is meant to finish up a foreign key addition started with ALTER TABLE ... ADD FOREIGN KEY ... NOT VALID. 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