I was under the impression that all standard SQLState codes are
defined by the SQL standard. Are they not? Who has the final word when
it comes to SQLState values?
PS: I would prefer using the same SQLState with two different codes. IBM
does the same in many places for DB2.
Gili
On 28/04/2011 4:44 PM, Thomas Mueller wrote:
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.