BUG #14025: Unable to validate constraints

Поиск
Список
Период
Сортировка
От jan.kort@genetics.nl
Тема BUG #14025: Unable to validate constraints
Дата
Msg-id 20160316150811.5173.29176@wrigleys.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #14025: Unable to validate constraints  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
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

В списке pgsql-bugs по дате отправления:

Предыдущее
От: carlos_penteado@yahoo.com.br
Дата:
Сообщение: BUG #14026: Problem to convert number to real
Следующее
От: srivathson.k@zohocorp.com
Дата:
Сообщение: BUG #14028: FATAL: cannot perform encoding conversion outside a transaction