mridoni / gixsql

GixSQL is an ESQL preprocessor and a series of runtime libraries to enable GnuCOBOL to access PostgreSQL, ODBC, MySQL, Oracle and SQLite databases.
GNU General Public License v3.0
16 stars 8 forks source link

native last rc #112

Closed GitMensch closed 2 years ago

GitMensch commented 2 years ago

.. for pg interface

something similar may likely be done for the other interfaces, too.

it helps for type checks (which is the reason that this PR may not compile clean, it is mostly thought as a reminder) and definitely helps during debugging showing enum values instead of integers which must be manually cast to the appropriate enum to follow the code better

GitMensch commented 2 years ago

Would definitely not compile as last_rc is used as a mixture in the pg interface, once with internal defines like DBERR_NO_ERROR and once with PGresultStatus values.

While this sounds "potentially troublesome" to me this PR as-is does not (even try to) handle this correct, so closed for now (and unlikely to be tackled by me).