title: PHP Postgres constraint violation - can I get the constraint name somehow?
body: <p>We have a web application talking to a Postgres SQL database at work - I've set up many constraints on the server to keep data consistent but we have problems with reporting nicely what it is that prevents the user from entering his (invalid) data at a given moment.</p>
  
  <p>The only thing we can get is "Constraint violation" but that isn't very descriptive, from perl or directly from PGAdmin we get nice info as to which constraint caused the failure (the constraint's name) - is there a way to do the same in PHP?</p>
  
  <p>We're able to upgrade PHP or use a different db access module if it would help so I'm interested in knowing if it's possible to do using any way that you could safely recommend.</p>