Hi,

> I couldn't any find any reliable explanation for SQLState 23506

H2 uses two error codes (23503 and 23506) for referential integrity violation:

REFERENTIAL_INTEGRITY_VIOLATED_CHILD_EXISTS_1 = 23503;
REFERENTIAL_INTEGRITY_VIOLATED_PARENT_MISSING_1 = 23506;

This was requested by a user some time ago, so he can distinguish
between missing parent and missing child row. The error message itself
is the same. Maybe it would be "better" to use the same SQL state, but
different error codes. However, if possible I would like to keep an
1:1 mapping.

>> I also can't find information about SQLState 23507. Isn't SQLState
>> 23502 "An insert or update value is null, but the column cannot
>> contain null values" more appropriate in this case?

Are SQL states really standardized to the last digit? When searching
for "sqlstate 23503" in Google, I find IBM DB2 documentation, but no
link to any standard.

Regards,
Thomas

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to