Hi Thanks Chris, yes i have already tested ereport and even made up my own sql state to report and error but from the application i can not access this error code directly (through the PQexec,
PQresultErrorField,
etc functions because the PGresult returns NULL) but i have to register a callback function that will be called with this error code with the idea to format the error message so i could intercept this and do something, but this does not allow me to have direct access to the flow where this is all happening .. i hope it is clear ...