"Chris Hoover" <revoohc@xxxxxxxxx> 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