> Right now, I do this like this:
> 
> if ($err =~ /name_of_first_foreign_key/) {
> $r->error_exit('First error message.')
> }
> elsif ($err =~ /name_of_second_foreign_key/) {
> ...

As an aside comment, a bit more regex foo with \b is indicated here :-)

if ($err =~ /\bname_of_first_foreign_key\b/) {
  $r->error_exit('First error message.')
}

Andreas
-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to