Thread: Setting sqlstate in plpgsql function

Setting sqlstate in plpgsql function

From
"Chris Hoover"
Date:
Is where anyway to set the sqlstate to a custom value when inside a plpgsql function?  I am still working on converting from Sybase ASA to Postgres and some of the triggers and stored procedures in Sybase are setting the variable to specific custom values.

Thanks,

Chris

Re: Setting sqlstate in plpgsql function

From
Tom Lane
Date:
"Chris Hoover" <revoohc@gmail.com> writes:
> Is where anyway to set the sqlstate to a custom value when inside a plpgsql
> function?

Nope :-(.  There's been some discussion of extending plpgsql's RAISE
command to allow specification of a SQLSTATE, but nothing's been done.

            regards, tom lane