From: | Tomasz Myrta <jasiek(at)klaster(dot)net> |
---|---|
To: | Peter Gabriel <Peter(dot)Gabriel(at)gmx(dot)de> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: handling error in a function |
Date: | 2002-12-18 10:07:22 |
Message-ID: | 3E0048DA.3070408@klaster.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
Peter Gabriel wrote:
>
> When executing this and violating that constraint (i mustn't delete that
> row), the function aborts with "unknown error" and i have no way to
> return 0 or
> something like that.
>
> I am programming with PHP and PEAR, each time, the result set is an object
> of type error, the script jumps to an error page, to calm the angry
> customers.
I don't know, how PHP works with Postgresql, but in psql I get such
error, when deleting wrong row:
ERROR: <unnamed> referential integrity violation - key in table_master
still referenced from table_detail
Maybe it is possible some way to access this error inside PHP?
Tomasz Myrta
From | Date | Subject | |
---|---|---|---|
Next Message | Christoph Haller | 2002-12-18 10:21:59 | Re: Dynamic sql program using libpq |
Previous Message | Christoph Haller | 2002-12-18 09:04:19 | Re: handling error in a function |