PSQL

    Added in

    2.5.1

    CHAR(5)

    Description

    In a “WHEN …​ DO” error handler, the SQLSTATE context variable contains the 5-character, SQL-2003-compliant status code resulting from the statement that raised the error. Outside error handlers, is always '00000'. Outside PSQL, it is not available at all.

    Notes