Finding out which constraint was violated?
From: Felix E. Klee (felix.klee_at_inka.de)
Date: 09/30/04
- Next message: Michael Peppler: "Re: Perl with MySQL"
- Previous message: Chris Underhill: "RE: Perl with MySQL"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 30 Sep 2004 03:45:00 +0200 To: dbi-users@perl.org
Hi,
when a constraint was violated by an INSERT statement, I would like to
find out which constraint that was (i.e. it's name). I want this
information in order to give the user a meaningful error message
(e.g. "Your desired user id has already been taken. Please, go back and
try with a different one.").
What's the recommended way to do that?
Or should I implement constraint checking also in the Perl program? (I
wouldn't like that because it means implementing rules twice).
BTW, I'm interfacing with PostgreSQL 7.4.5.
Felix
- Next message: Michael Peppler: "Re: Perl with MySQL"
- Previous message: Chris Underhill: "RE: Perl with MySQL"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]