Subject Re:proposal for new constraint syntax
Author Carlos H. Cantu
Look this:

http://tracker.firebirdsql.org/browse/CORE-1852

[]s
Carlos H. Cantu
www.FireBase.com.br - www.firebirdnews.org
www.warmboot.com.br - blog.firebase.com.br


FAyc> what about to add a custom error message for each constraint violation
FAyc> instead of default system generated

FAyc> the syntax would be

FAyc> ... constraint <constraint_name> constraint_type errormessage 'some text'

FAyc> or

FAyc> ... constraint <constraint_name> constraint_type exception <exception_name>

FAyc> for example:

FAyc> alter table TABLE1 add constraint CHECK_FILED1 check (FIELD1 > 100)
FAyc> errormessage 'field must be above 100';

FAyc> or

FAyc> create exception TABLE1_FIELD1_ERROR '............';

FAyc> alter table TABLE1 add constraint CHECK_FILED1 check (FIELD1 > 100)
FAyc> exception TABLE1_FIELD1_ERROR;