wg/epgsql — pull request #24 by RJ (2013-02-08 14:54:03+00:00)
Title: Lookup postgres error name from code

Two commits -
The first autogenerates a mapping file from the postgres source code, so you can say:
pgsql_errcodes:to_name(<<"23503">>) -> foreign_key_violation.

The second modifies #error{} to add a codename field. This is useful, since you can match on things like fkey violations easily. Not backwards compatible though, existing code would need recompiling. Probably warrants a version bump and scary warning if you accept it.