Re: User's exception plpgsql - Mailing list pgsql-patches

From Neil Conway
Subject Re: User's exception plpgsql
Date
Msg-id 42E5C41E.1060805@samurai.com
Whole thread Raw
In response to Re: User's exception plpgsql  (Pavel Stehule <stehule@kix.fsv.cvut.cz>)
Responses Re: User's exception plpgsql  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-patches
Pavel Stehule wrote:
> can you show sample, please?

modifying_sql_data_not_permitted, null_value_not_allowed,
prohibited_sql_statement_attempted and reading_sql_data_not_permitted
are the examples I can see from scanning plerrcodes.h. If we had this to
do over again, I'm not sure I see the point in mapping a single
condition names to multiple SQLSTATEs, but it's probably too late to
undo that now.

> Exception variables can solve it, but its dead concept. We can have list
> of prohibited condition names and for its throw compile error condition
 > name is ambigous

Yeah, that's possible, but it doesn't seem any nicer :-(

-Neil

pgsql-patches by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: [HACKERS] Autovacuum loose ends
Next
From: Tom Lane
Date:
Subject: Re: User's exception plpgsql