-
Notifications
You must be signed in to change notification settings - Fork 250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sqlstate not available in exceptions #5
Comments
Okay, okay, I'll change it! What is the "the standard" that you're referring to? I'd like to have a look first. The SQL language-bindings recommendations? |
Ah, the standard for SQLSTATE I guess. It seems a little too much to introduce it for all client-side exceptions... For now I'm just adding it to sql_error. |
Okay — I just tagged 5.0.0, and added sql_error::sqlstate() in 5.0.1. Please let me know how it works for you. Important to know that the field can be empty, in cases where no sqlstate is known. As you say we can extend this later by synthesising values, and perhaps moving the new information up the inheritance hierarchy. |
I'm about to switch sqlsmith from libpqxx to libpq since the former doesn't record the sqlstate in exceptions.
I looked at the libpqxx code, but I wasn't sure where to introduce it in the class hierarchy.
For example, the standard also defines an sqlstate for errors that appear on the client side, so ideally we'd synthesize these.
also reported here: http://pqxx.org/development/libpqxx/ticket/219
The text was updated successfully, but these errors were encountered: