Closed ParkFramework closed 8 years ago
Check the sqlstate
property of pq\Exception\DomainException
:
https://mdref.m6w6.name/pq/Exception/DomainException#$sqlstate
Oh, from pq\Result? Let me check :)
Looks like we're missing the complete PQresultErrorField()
API :-/
How about a public (readonly) property pq\Result::$diag
which returns
array(
"severity" => "ERROR",
"sqlstate" => "A00A00",
"message_primary" => "...",
...
)
?
Basically everything that's available from PQresultErrorField: http://www.postgresql.org/docs/current/static/libpq-exec.html#LIBPQ-PQRESULTERRORFIELD
Great, thank you! :+1:
We are waiting for the new version :)
We need to know specifically error code, to create specific exception classes.
The documents have a table of detailed error codes: http://www.postgresql.org/docs/current/static/errcodes-appendix.html
How to get them in
pq\Result
?Thank.