Hi,

when a named constraint is violated, the name of the constraint which actually 
failed is not included in the error message.

Example 1:

  create table con (
    a text constraint must_not_be_null not null);
  insert into con values (null);

  Returns error "con.a may not be null".

Example 2:

  create table con (
    a text 
    constraint must_not_be_null check (a not null));
  insert into con values (null);

  Returns error "constraint failed".

Especially with many constraints in place, constraint names can be really 
helpful to fulfill the constraint. In this regard, error message 2 in 
particular is not helpful at all in fixing the violation.

It would therefore be nice if error messages could include the name of the 
constraint that failed.

Also nice to have: If multiple constraints fail at the same time, mention all 
failing constraints and their names in a single error message.

Ralf

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to