-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
 
 
> when a constraint was violated by an INSERT statement, I would like to
> find out which constraint that was (i.e. it's name).
> .
> What's the recommended way to do that?
 
The database will return the error to you. Just peek at $DBI::errstr
after the insert fails and should see something like this:
 
ERROR:  new row for relation "test" violates check constraint "myconstraint"
 
- --
Greg Sabino Mullane [EMAIL PROTECTED]
PGP Key: 0x14964AC8 200409302038
 
-----BEGIN PGP SIGNATURE-----
 
iD8DBQFBXKc9vJuQZxSWSsgRAk5GAKDiACBdn6pbzNH7UTCj8tqEQUeIPACdFu5b
5rRjlzaWY4lLZFZ10r1qZFw=
=tI78
-----END PGP SIGNATURE-----


Reply via email to