Adam(dot)Bukla(at)interia(dot)pl (Adam Bukla) writes:
> If function PQexec fails, I can get error code using PQresultStatus.
> But returned codes are very generally and do not specify what really
> happen. I can get detailed error description using PQerrorMessage
> function, but I need detailed error code (number).
Beginning in Postgres 7.4, there are standard SQLSTATE error codes
available (see PQresultErrorField), but older releases do not have them.
regards, tom lane