Add support for PG_DIAG_*_NAME error fields

Issue #161 resolved
Joe Van Dyk created an issue

Comments (6)

  1. Michael Granger repo owner

    This looks awesome. I wonder if we could use the new constants in conjunction with the implementation of #5 to do something like they did with Psycopg?

  2. Lars Kanis

    The new PG_DIAG_*_NAME error fields IMHO don't help in regards to issue #5. But psycopg does already proper subclassing of exceptions that is described in #5. It's realized through which is parsed and autogenerated from the documentation. We might adopt some ideas (although I would like parsing from postgresql/src/backend/utils/errorcodes.txt more).

    Regarding to the PG_DIAG_*_NAME error fields, no further changes are needed. We already have this link to the result object, which can be used to retrieve the PG_DIAG_* fields.

  3. Log in to comment