Re: the case for machine-readable error fields

From: Zeugswetter Andreas OSB sIT <Andreas(dot)Zeugswetter(at)s-itsolutions(dot)at>
To: Robert Haas <robertmhaas(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Alvaro Herrera <alvherre(at)commandprompt(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: the case for machine-readable error fields
Date: 2009-08-05 09:40:47
Message-ID: 6DAFE8F5425AB84DB3FCA4537D829A561DDE64F478@M0164.s-mxs.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers


> 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Boszormenyi Zoltan 2009-08-05 09:52:57 Re: ECPG support for struct in INTO list
Previous Message Magnus Hagander 2009-08-05 09:31:03 Re: 8.4 win32 shared memory patch