Postgrex v1.0.0-rc.0 Postgrex.ErrorCode
Summary
Functions
Translates a Postgres error code into a name
Translates a Postgres error name into a list of possible codes. Most error names have only a single code, but there are exceptions
Functions
Translates a Postgres error code into a name
Examples:
iex> code_to_name("23505")
:unique_violation
Translates a Postgres error name into a list of possible codes. Most error names have only a single code, but there are exceptions.
Examples:
iex> name_to_code(:prohibited_sql_statement_attempted)
"2F003"