Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1agh43-0006g9-JF for pgsql-bugs@arkaria.postgresql.org; Thu, 17 Mar 2016 23:10:47 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1agh43-000125-5y for pgsql-bugs@arkaria.postgresql.org; Thu, 17 Mar 2016 23:10:47 +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 1agD4M-00073Y-Dn for pgsql-bugs@postgresql.org; Wed, 16 Mar 2016 15:09:06 +0000 Received: from wrigleys.postgresql.org ([204.145.124.246]) by magus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1agD4I-0005Wx-Iu for pgsql-bugs@postgresql.org; Wed, 16 Mar 2016 15:09:05 +0000 MIME-Version: 1.0 Subject: BUG #14025: Unable to validate constraints To: pgsql-bugs@postgresql.org From: jan.kort@genetics.nl Date: Wed, 16 Mar 2016 15:08:11 +0000 Message-ID: <20160316150811.5173.29176@wrigleys.postgresql.org> X-Pg-Spam-Score: -1.9 (-) Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" 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 The following bug has been logged on the website: Bug reference: 14025 Logged by: Jan Email address: jan.kort@genetics.nl PostgreSQL version: 9.4.1 Operating system: Windows 2012 Server Description: When I do: - disable trigger all - incorrect foreign key reference - enable trigger all - validate Then I get no error, I was expecting an error. For example: -- This succeeds (expected) drop table if exists test1; drop table if exists test2; create table test2 (id int primary key); create table test1 (id int primary key, test2_id int references test2(id)); insert into test2 (id) values (1); insert into test1 (id, test2_id) values (1, 1); -- This fails (expected) drop table if exists test1; drop table if exists test2; create table test2 (id int primary key); create table test1 (id int primary key, test2_id int references test2(id)); alter table test1 disable trigger user; insert into test1 (id, test2_id) values (1, 1); alter table test1 enable trigger user; -- This succeeds (unexpected) drop table if exists test1; drop table if exists test2; create table test2 (id int primary key); create table test1 (id int primary key, test2_id int references test2(id)); alter table test1 disable trigger all; insert into test1 (id, test2_id) values (1, 1); alter table test1 enable trigger all; alter table test1 validate constraint test1_test2_id_fkey; Regards, Jan -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs