From: | jan(dot)kort(at)genetics(dot)nl |
---|---|
To: | pgsql-bugs(at)postgresql(dot)org |
Subject: | BUG #14025: Unable to validate constraints |
Date: | 2016-03-16 15:08:11 |
Message-ID: | 20160316150811.5173.29176@wrigleys.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
The following bug has been logged on the website:
Bug reference: 14025
Logged by: Jan
Email address: jan(dot)kort(at)genetics(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | carlos_penteado | 2016-03-16 20:07:06 | BUG #14026: Problem to convert number to real |
Previous Message | David Fetter | 2016-03-16 14:02:38 | to_char(OF) is broken |