[Monetdb-developers] Constraint violations with all details

Stefan de Konink stefan at konink.de
Sun Nov 23 15:06:54 CET 2008


I cannot find it back in the trackers but I think it have asked this 
question before.

Would it be possible to output the actual failing constraint details 
instead of 'just an error'.

sql>alter table relation_members_way add constraint relation_to_way_fkey 
foreign key(to_way) references ways;
!SQLException:assert:INSERT INTO: FOREIGN KEY constraint 
'relation_members_way.relation_to_way_fkey' violated

Inserting with INSERTS will give a nice error, because the query it self 
contains the problem. This is not true for a copy into, or in this 
respect just an alter table.


ps. indeed I have to think too long about a query that will show me the 
non existing primary keys.

More information about the developers-list mailing list