-
-
Notifications
You must be signed in to change notification settings - Fork 8
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
error handling (especially for 07001) #92
Comments
You are right. The interface changes were inevitable, but there should have been a warning.
Will work on that |
The fix for #94, when released, should also fix this. I am afraid that using the same codes as PosgreSQL wouldn't make much sense if using a different DB driver. |
Agreed. We may close this one as duplicate then.
Agreed. And as the messages come from the gixsql "frontend" library this would leave three choices (apart from "don't care"):
I think I'd say "document common error codes of GixSQL and - where known their values in other environments)". [it would be good to not have to look at the code to get more info on some numbers] |
I agree. |
A table with the error codes and a brief explanation has been added to the documentation (in the internal repository). I am reproducing it below: GixSQL-specific error codesWhen an error occurs, in the runtime libraries or in the DBMS, GixSQL does its best to return standard-compliant When one of these errors occur and there isn't a self-evident explanation (e.g. your program did not properly initialize a data field used for a prepared statement) you can use the logging system (see above) to try and diagnose the problem.
|
This is a maintenance pre-release for GixSQL. It fixes a few issues and adds two new databases drivers (Oracle and SQLite). The next "standard" release (presumably v1.0.18) will have feature parity for all database drivers. - Added new Oracle driver, based on ODPI - Added new SQLite driver - Solution for "PG: issue with prepared statements" (#99) - Solution for "PCursors cannot be re-opened after close" (#98) - Solution for "libgixpp: setStatus is called for errors without DBI parm passed - sets SQLERRM" (#94) - Solution for "error handling (especially for 07001)" (#92) - Solution for "show-stopper bug in pgsql_prepare" (#91) - Solution for "PREPARE does not work with VARLENGTH groups (ocesql compat)" (#79) - Partial solution for "PREPARE does not work with VARLENGTH groups (ocesql compat)" (#68) - Solution for "The PostgreSQL driver needs START TRANSACTION before using cursors" (#14) - Solution for "FR: support EXEC SQL VAR" (#21) - Fixed a bug in "problems with "codegen / logic issue for "GIXSQLCursorDeclareParams" (#88) - Fixed COMP-3 handling in drivers other than PostgreSQL - Rewrote the test suite (still MSTest-based) to dynamically generate a matrix of test to be run on the various platforms/database drivers
|
This is because these two error codes are not handled (as they should) as special cases, so they fall back to |
- Added new Oracle driver, based on ODPI - Added new SQLite driver - All the drivers have been updated and now implement the complete set of supported features - Solution for "PG: issue with prepared statements" (#99) - Solution for "PCursors cannot be re-opened after close" (#98) - Solution for "libgixpp: setStatus is called for errors without DBI parm passed - sets SQLERRM" (#94) - Solution for "error handling (especially for 07001)" (#92) - Solution for "show-stopper bug in pgsql_prepare" (#91) - Solution for "PREPARE does not work with VARLENGTH groups (ocesql compat)" (#79) - Partial solution for "PREPARE does not work with VARLENGTH groups (ocesql compat)" (#68) - Solution for "The PostgreSQL driver needs START TRANSACTION before using cursors" (#14) - Solution for "FR: support EXEC SQL VAR" (#21) - Fixed a bug in "problems with "codegen / logic issue for "GIXSQLCursorDeclareParams" (#88) - Solution for "FR: allow mapping of "NoRecCode"' (#95) - added --no-rec-code parameter to gixpp - Tokens in the parser have been labeled to improve diagnostics (pulled PR #96 by @GitMensch) - Fixed COMP-3 handling in drivers other than PostgreSQL - Rewrote the test suite (still MSTest-based) to dynamically generate a matrix of test to be run on the various platforms/database drivers - Added options for parameter generation in gixpp (-a was removed) - Added new GIXSQL_FIXUP_PARAMS option for runtime, to automatically convert parameter format in prepared statments - "Native" cursors are now the default for the PostgreSQL driver - "Smart" cursor initialization is now the default for all cursors, including those declared in WORKING-STORAGE (-L was removed from gixpp), should fix #101 - Removed dynamic cursor emulation from the ODBC driver when using PostgreSQL
According to the note above and the release notes finished. |
Not sure, but this change possibly created a new issue (or it was in since the initial implementation).
... but as followed above - this was never set, because there was an error... Current issues:
|
Ok, I will check this |
While this should "of course" never happen it did (not for the first time). While the reason this time was a changed interface (the 1.0.17 announcement possibly should have hinted at "you need to re-compile everything that uses prepared statements).
There is a correct sqlstate of 07001 but the error number is -108 and the error message "Generic GixSQL error".
Could this be adjusted to have a reasonable message? Even the internal name of the define would be much better than "generic".
And - not sure on this one - maybe it would be reasonable to use the same return codes as ecpg does?
https://www.postgresql.org/docs/9.2/ecpg-errors.html
Currently there is a return of -108 in both cases (while SQLSTATE is set correctly).
The text was updated successfully, but these errors were encountered: