#x27;s in identifiers correctly.
Also take multibyte characters into account in identifiers.
* Remove a meaningless 'static'.
* Reduce the use of snprintfcat(or SPRINTFCAT_FIXED macro) as much as possible.
Instead use PQExpBuffer library without having to worry about buffer length.
* Review the use of mylog().
Use macro MYLOG instead of function mylog in preparation for later changes and unify mylog() and inolog() using level parameter.
Enable the compiler to check the format string against the parameter of mylog() by adding __attribute__((format(printf,.,.))) to the declaration of mylog(GCC only).
Using this mechanism, check and fix many discordances of parameters.
* Implement myprintf() which prints logs according to printf format and make logs a little easier to read using the macro MYPRINTF() which calls myprintf().
* Fix some compiler warnings about MYLOG calls.
* Modify one MYLOG() and one MYPRINTF().
* Let program name as a part of logfile name. This would make debugging a little easier.
* Add a test case for parse-test.
* Add more test cases to parse-test.
* Add 2 test cases to parse-test which handles '
#x27;s in identifiers.
* Fix catalogfunctions-test. The output of catalogfunctions-test was changed along with the change of parse-test.
* Add a test case to parse-test.
* Introduce token control while parsing.
Detect *select .. into* or *select ... for update* and suppress *declare .. cursor for* clause in declare/fetch mode using the mechanism.
* Add __FILE__, __FUNCTION__, __LINE__ to MYLOG.
* Fix an parameter unmatch error which would cause a crash.
* The 1st cut of qlog renewal.
Removed some qlogs, changed some qlogs to MYLOG and added some qlogs.
* Fixed typos.
* Stop build operations on error.
* Use macro QLOG instead of function qlog.
* The second cut of QLOG renewal.
* Move the implemetation of GetExeName() from psqlodbc.c(psqlsetup.c) to mylog.c.
* Remove the GssAuthUseGssapi option completely.
* Fix bug that calls strdup() for NULL pointers.
Per report from Ding, Haiqiang.
* Further Mylog renewal.
* Detect fast shutdown while connecting.
* Fix a compilation failure with nmake since 503bb09.
Report and patch by Michael Paquier.
* Put back the behavior when conversion errors from the current locale to SQLWCHAR occur.
Simply returns zero length string instead of erroring out.
Per report from Andrus.
Also take logs when conversion errors occur.
* Further improvement of qlog.
* Add missing type declaration of log_params().
* Add level parameter to Commlog/Mylog option of setup program.
* Review ER_ReturnError().
* Improve QLOG.
* Add __attribute__((format(printf,3,4))) to the declaration of snprintfcat().
* Move 2 CtrlCheckButton() calls into a switch statement.
* Allow PROCCALL in ReadOnly mode.
Per report from Matej Mihelic.
* Fix compiler warnings.
* Prep release 09.06.0500
* Don't forget to set default values when registering dsn via RegisterRegDsn.
* Fix a compiler warning.
* Fix multibyte handling of ansi driver.
* Handle PG 10 identity columns.
* For PG10 servers, we will never see "unknown" output columns.
Fix regression test catalogfunctions-test for PG10 servers.
* Remove the "unknown" column from colattribute-test regression test.
Because there's no "unknown" output column in PG10 servers, it seems meaningless to test "unknown" case.
* Add some QLOGs.
* Improve @@identty handling.
Use multibyte-aware eatTableIdentifiers() instead of next_name_token().
Use identifierEscape() to escape single quotes or double quotes.
* Fix "unrecognized format function type" warnings in old GCC.
Also use PG_PRINTF_ATTRIBUTE instead of printf in __attribute__((format(printf, .., ..))) function attribute.
* Review the use of encoded_nextchar().
Remove variables which work in conjunction with encstr(encoded_str) so as to avoid misleadingness.
* Use pg_get_serial_sequence() to get serial sequence of identity columns or serial columns. pg_get_serial_sequence() for identity columns became available in PG 10 rc1.
* Review getNextToken() in parse.c.
* Change the return value of strncpy_null() from char * to size_t.
* Change QLOG() so that it calls corresponding MYLOG() as well.
* Improve error handling in info.c.
* Improve the use of SC_error_copy() in info.c.
* Correct CC_set_error_if_not_set().
* Use macro IS_NOT_SPACE() instead of !isspace() to ensure that !isspace() is applied to non-null characters.
* Don't forget to call resetPQExpBuffer() before processing a new query.
* Preparation for development with VC15(VS 2017).
* Correct the use of MatchInfo object which is an output of Select-String.
* Fix the bug that 'create table T_$001 (c)' fails when useServerSidePrepare is turned on.
Per report from Gregory Pruss.
* Prep version 10.00.0000!
* Call Get-VSSetupInstance to detect Visual Studio installations whose version >= 15 when VSSetup module is available.
* Fix my mistake of previous commit.
* Review the handling of @@IDENTITY when a column's default is nextval(a_sequence) but the column isn't a serial. Unfortunately the function pg_get_serial_sequence() doesn't work for sequences which aren't serial type.
* Add add an option -NoPDB to buildInstallers.ps1.
The switch option can be specified so as to exclude PDB files from the installers.
* Use MYLOG instead of inolog in inouealc.c .
* Fix a bug in pgdebug_realloc().
Fix compiler warnings in inouealc.c
* Free any data at exec params before the statement is executed again or the next set of parameters is processed. If not, then there will be a memory leak when the next SQLParamData/SQLPutData is called.
Per report from Mihai Giurgeanu <mihai.giurgeanu@gmail.com>.
* Review the level of MYLOG, QLOG.
Divide *level 1(detail)* log into *level 1(tuple level)* log and *level 2(detail)* log.
* Prep release 10.01.0000
* Fixed typo release document.
* Oops, get_DocumentElement() doesn't return xml type.
* Fix a bug in is_setting_search_path. A pointer might be incremented to point beyond the null terminator.
Report and patch by Grant Shirreffs.
* It is not appropriate to distribute test/Makefile.
The file isn't in git repo and is generated depending on the environment via configure operation.
* It's safer to call setlocale(LC_CTYPE, "") than calling setlocale(LC_ALL, "").
Report and patch by Mario De Frutos.
* Fix build for non-gcc systems
* Avoid replacing effective notice messages.
Report from Wolfgang Apolinarski. Patch by Clemens Ladisch.
* Modify positioned-update-test.
1. Add a SQLSetPos(.., SQL_REFRESH, ..) call so that the test passes SC_pos_reload().
2. Add a primary key to pos-update-test table(KEYSET-DRIVEN cursor needs non null int4/oid unique key).
3. Add expected/positioned-update-test_1.out for KEYSET-DRIVEN cursors.
* Oops, setting *tidval* variable in SC_pos_reload_with_key() was missing by mistake.
* Handle MALLOC/REALLOC errors while fetching tuples more effectively.
Per report from Haruka Takatsuka.
* Make SQLSetPos(SQL_DELETE/SQL_REFRESH) more effective.
Because queries calling currtid(2) like
select .. from .. where ctid=currtid2(.., ..)
cause Seq Scan, their execution may be very slow.
It is better to execute queries using subqueries like
select .. from .. where ctid=(select currtid2(.., ..))
because they cause Tid Scan.
Report and changes by Tsunakawa Takayuki.
* Fix a crash bug in AddDeleted().
Report and patch by Takayuki Tsunakawa.
* Prep release 10.02.0000
* Fixed typo..
* Put back the handling of lock_CC_for_rb variable.
The variable lock_CC_for_rb should be held per connection.
Per report from Ayman Samamry.
* Fix SQLGetTypeInfo() so that it filters SQL_TYPE_DATE, SQL_TYPE_TIME or SQL_TYPE_TIMESTAMP for ODBC 2.x applications.
Per report from Oleg Tonkikh.
* Revise ConfigDSN() so that it handles the 4th parameter(lpszAttribues) correctly.
Per report from Haribabu Kommi.
* Fix a crash bug when handling error messages.
Also modified some error messages.
* Let SQLTables() or SQLTablePrivileges() show partition tables.
* Fix some typos in help messages of regrees.ps1.
Also cleanup the handling of DeclareFetch parameter a little.
* fix build on Solaris using Solaris Studio
* Add a parameter SpecificDsn of regress.ps1.
* Reduce DB access to pg_class or pg_index by caching relhasoids, relhassubclass etc.
It would improve the performance of SQLSetPos() or SQLBulkOperations() very much in some cases.
Per report from Takayuki Tsunakawa.
* Prep release 10.03.0000
* Create an output variable from a shell variable ODBCLIB using AC_SUBST() in configure.ac. The variable is used in test/Makefile.in.
* odbc_config is often missing in ubuntu.
In those cases you can try
configure --with-unixodbc=__without_odbc_config
. If necessary, configure with LDFLAGS and/or CPPFLAGS e.g.
configure "LDFLAGS=-L /usr/lib/x86_64/linux/gnu" --with-unixodbc=__without_odbc_config
.
* Fix compiler warnings.
* Call AC_CHECK_SIZEOF(long int) in configure.ac and always place config.h before sql....h. Due to this change, sqltypes.h of unixODBC can recognize SIZEOF_LONG_INT used in psqlodbc driver.
* Fix compiler warnings in i386-linux-gnu.
* Correct the path name of Visual Studio 2017 tools.
* Review RegisterDsn.
1. Add a new functionality to 'check_dsn'(renamed from 'existCheck').
This option returns 0 when dsn exists,returns -1 when dsn does not exist,
(new) returns -2 when dsn exists but the driver doesn't exist.
2. Add 'reinstall_driver' option. This option is effective when
'check_dsn' option returns -2.
* Remove obsolete maps pointed out by Daniel Cory <dcory@tableau.com>.
1. POWER -> pow
2. CONCAT -> textcat
3. LEFT -> ltrunc
4. RIGHT -> rtrunc
* Remove connSettings option and/or pqopt option from the OutConnectionString parameter of SQLDriverConnect() when each option doesn't exist in InConnectionString parameter.
* Make it possible to separate object trees x86_ANSI_Release, x86_Unicode_Release, x64_ANSI_Release, x64_Unicode_Release, winbuild/test_x86, winbuild/test_x64, installer/x86, installer/x64, installer/psqlodbc-setup/obj and installer/psqlodbc-setup/bin from source tree on Windows.
* Add an option to reinstall the driver.
* Added shell scripts to build binaries, test and build installers for Windows under WSL(Windows Sybsystem for Linux) or cygwin environment.
* Ignore BOM(byte order mark)s when there are BOMs in the input lines of test/reset-db.
* Increase the number of choices for "diff" commands in Windows.
* Fix the regression test failure in odbc-escapes caused by the commit 499fb29b80cfaf60fffd81549b36ec2def1cf21d.
The parameters should be cast because parameters of concat() function are variadic "any".
* Unbuffered-IO in Windows is incredibly slow. Instead call fflush() after fprintf().
* Add an alias DX of *Database* keyword for connection strings to aviod the use of "database" keyword which has a special meaning in some apps or middlewares..
* Fix a bug caused by the previous commit e7be9779ba98b14d4c694acf87c83122780cfa67.
Also use a macro MYLOG() instead of function mylog().
* The Windows binaries of next release will be built using Visual Studio 2017.
* In Postgresql, numeric items without precision are unlimited and there's no natural map between SQL Data types.
Add an option *Numeric(without precision) as*.
* Documentation fix.
* Change the default platform parameter from "x64" to "both" in Windows regression test.
* Fix a bug that SQLSpecialColumns() returns oid/xmin incorrectly when a table does not exist.
Patch by Quan Zongliang.
* Prep release 11.00.0000.
* Correct the rgbInfoValue returned by SQLGetInfo(SQL_TIMEDATE_FUNCTIONS, ..).
Pointed out by Song X. Gao.
* Because the field 'relhasoids' was dropped in PG12, psqlodbc drivers would have some troubles with PG12 servers.
Report and patch by Vladimir Koković.
* Register drivers {PostgreSQL ANSI} and {PostgreSQL Unicode} during installation on 64bit Windows so that users could use the same connection strings in both x86 and x64 environments.
Per report from Grant Shirreffs.
* Correct the rgbInfoValue returned by SQLGetInfo(SQL_LIKE_ESCAPE_CLAUSE, ..).
Pointed out by Grant Shirreffs.
* Fix a typo in SQLForeignKeys-ResultSet-Column.
'deferrablity' should be 'DEFERRABILITY'.
Report from Alexander Roskamp.
* Correct the rgbInfoValue returned by SQLGetInfo(.., SQL_NUMERIC_FUNCTIONS(SQL_SYSTEM_FUNCTIONS or SQL_STRING_FUNCTIONS, ..).
Pointed out by Grant Shirreffs.
* Bug fix: don't forget to set parameter numbers while handling escaped ODBC
functions.
Report and patch by Grant Shirreiffs.
* Fix test_connection() in setup.c so that settings of conn_settings and pqopt option are reflected properly.
* Prep release 11.01.0000
* Fix the bug that SQLGetDescField() for Field SQL_DESC_COUNT returns SQLINTEGER value which should be of type SQLSMALLINT.
* Since commit 778571, SQLGetTypeInfo() filters SQL_TYPE_DATE, SQL_TYPE_TIME and SQL_TYPE_TIMESTAMP for ODBC 2.x applications. However it isn't appropriate to filter them for individual SQLGetTypeInfo(.., SQL_DATE/TIME/TIMESTAMP(9/10/11)) call because Microsoft ODBC driver manager calls SQLGetTypeInfo(.., SQL_TYPE_DATE/TIME/TIMESTAMP(91/92/93)) of ODBC 3.x drivers when ODBC 2.x applications call SQLGetTypeInfo(.., SQL_DATE/TIME/TIMESTAMP(9/10/11)).
Per report from Michael Riksman.
* Added support for scalar functions TIMESTAMPADD(), TIMESTAMPDIFF() and EXTRACT() functions.
* The macro IS_NOT_SPACE() is used for not pointers but integers.
* Fix a crash bug when SQLProcedureColumns() handles satisfies_hash_partition(). The proargmodes column of satisfies_hash_partition()'s pg_proc entry is not null but the proallargtypes column is null. Per report from James.wang <james.wangke@gmail.com>.
* Silence some compiler warnings.
* Prep release 12.00.0000
* Fix result-conversions regression test.
1. Remove tests for abstime type because the type was removed in PG12.
2. Update results for PG12's new floating point output format.
Results for old floating point output format were moved to result-conversions_2.out and result-conversions_3.out.
* Check the format of version number in editConfiguration.ps1.
* Fix the bug that causes Error : A parameter cannot be found that matches parameter name‘ne'.
1. Check BuildResult(the result of drivers build) before building installers.
2. Enclose the command part * Find_VSDir $vc_ver * with parentheses so that
the subsequent * -ne "" * isn't considered to be a parameter.
* Flush stdout before exiting.
* Cope with the removal of pg_class.relhasoids in PG12 correctly when retrieving updatable cursors.
* Update the expected result of odbc-escapes regression test for PG12's new floating point output format.
Old odbc-escapes.out was renamed odbc-escapes_1.out.
* Fix param-conversion and error-rollback regression test in PG12.
Old param-conversions.out was renamed param-conversions_2.out.
Old param-conversions_1.out was renamed param-conversions_3.out.
Old error-rollback.out was renamed error-rollback_1.out.
* Prep release 12.01.0000
* Use diff command of git bash in preference to wsl diff command.
Unfortunately >> (appending redirected output) doesn't work well with wsl.
* Add a new *Display Optional Error Message* option. This option allows to
display error messages other than primary one.
Also add documentaition about the option and *Numeric as* option.
* Handle notice messages in libpq_bind_and_exec(). Sets and resets a notify receiver
around PQexecParams() or PQexecPrepared().
* Ignore PQtransactionStatus PQTRANS_ACTIVE in LIBPQ_update_transaction_status().
PQTRANS_ACTIVE isn't a transaction status.
* Improve execution of parameterized SQL statements with arrays of parameters by sending chunks of SQL statements.
If SQL_ATTR_CURSOR_TYPE of an statement is SQL_CURSOR_FORWARD_ONLY, SQL_ATTR_CONCURRENCY is SQL_CONCUR_READ_ONLY and extended protocol isn't used, the batch execution of the statement is possible.
A new option Batch Size was introduced for such cases.
Batch Size: Split an array (of parameters) into chunks of Batch Size to execute statements. The last chunk may contain less than Batch Size elements. Setting 1 to this option forces the current one by one execution.
Also turn off use_server_side_prepare option temporarily when batch executuion is possible.
* Change SC_execute() so that it returns a return code which is not
affetced by the preceding results. It's necessary for batch execution
with arrays of parameters.
* Add regression test for batch execution.
* Add a new option IgnoreTimeout.
Some tools issue issue SQLSetStmtAttr(.., SQL_ATTR_QUERY_TIMEOUT,,) internally and sometimes it's difficult for users to change the timeout value. You can disable the timeout by turning on this option.
* An improvement for psqlodbc developpers. Make it possible to call some shell scripts from other directories.
* Suppress a warning.
* fixed loop initial declaration used outside C99 mode.
* Prep release 12.02.0000.
* Improve error reporting abuut SC_pos_reload_needed().
* Oops, I forgot to place a line in a macro defintion.
* * Fixed the way joins are identified in the parser * Added to gitignore
* Fix a compilation error in cygwin.
* * Remove the single table restriction in SC_set_SS_columnkey
* Correct the handling of SQL_ROW_ERROR and SQL_ROW_SUCCESS_WITH_INFO.
* Revise the handling of QResultClass list.
Introduce macros QR_concat(), QR_detach() and QR_next().
* Hold the first and last result for parametrized SQL statements with array of parameters. This would improve the performance of bulk inserts/updates etc.
* Fix compilation errors with vc10 caused by the previous commit.
* Add support for development with VC16(Visual Studio 2019).
MSToolsVersion parameter of BuildAll.ps1 and of regress.ps1 are deprecated.
* A code cleaup.
Remove curr_param_result property of StatementClass and separate parsed result from the exec result.
* Fix a compilation error with GCC 10 due to conflicting variable names.
Patch by Paul Wise.
* Suppress some gcc compiler warnings.
* Call AC_CHECK_SIZEOF() or AC_CHECK_TYPES() macros at earlier stage where LIBS variable isn't set yet.
These macros compile and run some programs. On some platforms(with some linker options like
--no-as-needed in Lnux Gnu linker) the programs try to link libraries specified by LIBS variable at run time.
There are some cases that the programs fail due to missing library which is actually not needed and AC_CHECK_SIZEOF() returns 0.
* Fix a compilation error with vc10.
* Cope with the case that openssl libraries link msvc runtimes other than libraries which psqlodbc or libpq links.
* Add support for CONVERT scalar function.
* fixed C99 mode.
* Prep release 13.00.0000.
* fixed typo, per report Hayato Kuroda-san.
* Remove deprected-test from regression test. It is no longer needed
and causes compilation errors in some environments.
* Refactor check for SSL connection
PQgetssl has been discouraged from use since postgres 9.5 since it
will risk false negatives if postgres supports other TLS libraries
than OpenSSL. Refactor to use PQsslInUse which has been available
since 9.5 for just this purpose.
* Fix a bug of CC_send_query_append() when the ignore_roundtrip_time flag is on.
* Add a call for SQLDescribeCol() before SQLExecute() to prepare-test.
The diff of the result was reported by Mangold Fabian and will be fixed in the later commit.
* Add a *update returning* test case to insertreturning regression test.
The diff of the result was reported by Patrick Cheung and will be fixed
in the later commit.
* Let SQLDescribeCol() use parsed result when the current executed result is NULL.
This change fixes the diff of prepare-test regression test reported by Mangold Fabian.
* Let SQLExecute() destroy the old result first.
This change fixes the diff of insertreturning-test regression test
reported by Patrick Cheung.
* Forget to apply disable_convert_func flag to VARCHAR and LONGVARCHAR.
* Prioritize DISABLE_KEEPALIVE checkbox over the disable_keepalive bit of ExtraOptions.
* Format check for ExtraOptions of setup dialog.
* Prep Ver 03.01.0000
* Remove a mylog() call which is a dupilicate of the preceding MYLOG()
macro call.
Also direct use of mylog() should be avoided because mylog() uses lots of CPU.
Report and patch by Marko Ristola.
* We've noticed that the password field on the PostgreSQL Connection
dialog is always focused when empty, even when other fields that appear
earlier on the dialog (and in the tab order) are empty. This is only a
minor annoyance, but it does seem like it would be contrary to the
expectation of most users.
I would propose separating the conditional to inform the user that the
password is required, but still focus the first empty field.
Aaron Spike
* Remove REFCUR_SUPPORT, add FetchRefcursors setting
* Support fetching results from multiple refcursors * Multiple result sets are returned if multiple refcursors are found * Works with both ODBC CALL and PostgreSQL CALL syntaxes * Query must be executed in a transaction to avoid cursors being closed * Now works when output parameters are present * Added fetch-refcursors regression test
* Allow installation and testing of a debug build of the driver (useful for debugging).
Fixed a bug in `regress.ps1` where accepting the default password of
`postgres` did not work.
* Suppress compiler warnings.
* The commit 2e67af added a new ansi test dsn psqlodbc_test_dsn_ansi_debug. So change the way how to determine ansi test driver.
* Named parameter binding support
* Suppress compiler warnings.
* Use ODBC 3 column names for the result set of catalog functions.
* CPTimeout option set to 60 for odbc driver by default
* Prep Release 13.02.0000.
* 1. Fix a bug that SQLGetDiagField(SQL_DIAG_NUMBER) with SQL_HANDLE_DBC returns SQL_NO_DATA
even if an error record exists.
2. Fix a typo "RECISION" which should be "PRECISION".
* Fix FetchRefcursors issues 1. Fix crash if error occurs when fetching noninitial refcursor 2. Fix error when fetching NULL refcursor 3. Return empty result if all refcursors are NULL
* Enable SQLColumnPrivileges functionality.
Add a regression test for SQLColumnPrivileges().
* Currenly SQLColumnPrivileges() call fails. Fix a typo which is the cause.
Patch by foxi_yiyi12081003@outlook.com.
* Prevent cursors being closed prematurely
* Bug fix: SQLColAttribute returns wrong column name - In some circumstances it was returning a name from the previous result
* Define TRUE and FALSE for regression tests in case they aren't defined.
* Prep release 15.00.0000.
* Use autoconf to check for stdbool.h Committer: Dave Cramer <davecramer@gmail.com>
* Make it possible to use standard bool on Windows.
* Prep Relese 16.00.0000.
* use unsigned word for lengths to avoid overflow
* make stapos an unsigned int just in case
* Build and release using github actions
* Use mimalloc to improve performance and reduce memory allocation lock contention (#6)
* Add mimalloc submodule and update build script
* Add steps to build and test with UseMimalloc
* Update mimalloc submodule
* Change UseMimalloc parameter type to switch
* Add ExpectMimalloc parameter
* Fetch mimalloc submodule and use mimalloc parameters
* Prevent MIMALLOC_VERBOSE aborting tests
* Uninstall driver after tests; upload mimalloc artifacts
* add x64 artifacts
* increment version for testing
* use installed version of postgresql to build against
* download win32openssl and build with it
* fix error
* fix error
* get latest windows version from edb
* use same version of openssl to build x64 and x86
* Key caches based on software versions (#13)
* Key caches based on software versions
* Rename cache keys to prevent partial key matches
* Add mimalloc release (#14)
* use openssl64 from slproweb
* Use strdup on non-Windows systems (#17)
* Add workflow version to force PostgreSQL rebuild (#19)
* Fix warnings about caches not being saved (#20)
* Fixed typos in all source code and documentations (#11)
* Fixed bugs, reported in issue #8. (#25)
* Fixed bugs, reported in issue #8.
Bunch of memory leaks, occuring in tests.
One heap-buffer-overrun in read operation at convert.c:3162.
Two memory leaks, detected by my unit tests:
password, conn_settings, pqopt fields overwrite if their values
provided by both, system config and connstring.
Restored reference counting lifetime managment of COL_INFO objects.
Some minor cosmetic changes.
Signed-off-by: Alexandr Kuznetsov <progmachine@xenlab.one>
* Minor cosmetic changes.
Signed-off-by: Alexandr Kuznetsov <progmachine@xenlab.one>
* Forgot set col_info to NULL in TABLE_INFO object while clearing it.
Signed-off-by: Alexandr Kuznetsov <progmachine@xenlab.one>
* Fixing comments.
Signed-off-by: Alexandr Kuznetsov <progmachine@xenlab.one>
---------
Signed-off-by: Alexandr Kuznetsov <progmachine@xenlab.one>
* Support building against VC17 on AMD64 (#9)
* Prevent mimalloc release tag recursively triggering another release (#27)
* build against postgresql version 17_beta2 (#37)
* build against postgresql version 17_BETA2
* use openssl v 3_3_1
* Updated error code returned by SQLGetData function (#35)
* Updated error code returned by SQLGetData function
* use openssl v 3_3_1
---------
Co-authored-by: Carlos García García <cgarciag@denodo.com>
Co-authored-by: Dave Cramer <davecramer@gmail.com>
* only change what is necessary (#12)
* Implementation of SQLSetDescRec & SQLGetDescRec functions (#23)
* Implemented SQLSetDescRec function
- Fixed SQL_DESC_PRECISION field in IPDSetField & IPDGetField functions
- Added support for other fields for bookmark column in ARDSetField
- SQL_DESC_TYPE
- SQL_DESC_DATETIME_INTERVAL_CODE
- SQL_DESC_OCTET_LENGTH
- SQL_DESC_PRECISION
- SQL_DESC_SCALE
* Implemented SQLGetDescRec function
- Handled SQL_NO_DATA case in GetField functions
- Handled 01004 SQLSTATE in GetField functions
- Added support for SQL_DESC_NAME & SQL_DESC_NULLABLE IPDGetField functions
* Implemented SQLGetDescRecW & SQLSetDescRecW functions
- Updated PGAPI_GetFunctions function to get new functions
- Updated psqlodbc.def file for new functions on Windows
- Fixed HY007 error handling
* Added regression test for DescRec functions
---------
Signed-off-by: Alexandr Kuznetsov <progmachine@xenlab.one>
Co-authored-by: Hiroshi Saito <hiroshi@winpg.jp>
Co-authored-by: Hiroshi Inoue <h-inoue@dream.email.ne.jp>
Co-authored-by: Ayappan <ayappap2@in.ibm.com>
Co-authored-by: Maxim Zakharov <dp.maxime@gmail.com>
Co-authored-by: worldleaderpretend <russman7474@gmail.com>
Co-authored-by: Daniel Gustafsson <daniel@yesql.se>
Co-authored-by: Aaron Spike <spikeac@mlc-wels.edu>
Co-authored-by: Adrian Grucza <adrian.grucza@iress.com>
Co-authored-by: Hiroshi Inoue <hinoue205@gmail.com>
Co-authored-by: Vadim <vadim.presniak@bentley.com>
Co-authored-by: Ubuntu <ubuntu@ip-172-30-5-130.ec2.internal>
Co-authored-by: Dave Cramer <davecramer@gmail.com>
Co-authored-by: Adrian Grucza <46910040+apgrucza@users.noreply.github.com>
Co-authored-by: Hunaid Sohail <76044242+Hunaid2000@users.noreply.github.com>
Co-authored-by: Alexandr Kuznetsov <progmachine@xenlab.one>
Co-authored-by: Carlos García <garciagarciacarlos@gmail.com>
Co-authored-by: Carlos García García <cgarciag@denodo.com>
Co-authored-by: Keith Wedinger <keith.wedinger@improving.com>" href="/mirrors/aws-pgsql-odbc/commits/f17456c58b">Pull and merge updates from github.com/postgresql-interfaces/psqlodbc (#15)
1年前pgenlist.defchore: fork psqlodbc v152年前pgenlist.hchore: fork psqlodbc v152年前pgenlista.defchore: fork psqlodbc v152年前pgtypes.cchore: Merge Upstream 2025-04-21 (#125)1年前pgtypes.h#x27;s in identifiers correctly.
Also take multibyte characters into account in identifiers.
* Remove a meaningless 'static'.
* Reduce the use of snprintfcat(or SPRINTFCAT_FIXED macro) as much as possible.
Instead use PQExpBuffer library without having to worry about buffer length.
* Review the use of mylog().
Use macro MYLOG instead of function mylog in preparation for later changes and unify mylog() and inolog() using level parameter.
Enable the compiler to check the format string against the parameter of mylog() by adding __attribute__((format(printf,.,.))) to the declaration of mylog(GCC only).
Using this mechanism, check and fix many discordances of parameters.
* Implement myprintf() which prints logs according to printf format and make logs a little easier to read using the macro MYPRINTF() which calls myprintf().
* Fix some compiler warnings about MYLOG calls.
* Modify one MYLOG() and one MYPRINTF().
* Let program name as a part of logfile name. This would make debugging a little easier.
* Add a test case for parse-test.
* Add more test cases to parse-test.
* Add 2 test cases to parse-test which handles '
#x27;s in identifiers.
* Fix catalogfunctions-test. The output of catalogfunctions-test was changed along with the change of parse-test.
* Add a test case to parse-test.
* Introduce token control while parsing.
Detect *select .. into* or *select ... for update* and suppress *declare .. cursor for* clause in declare/fetch mode using the mechanism.
* Add __FILE__, __FUNCTION__, __LINE__ to MYLOG.
* Fix an parameter unmatch error which would cause a crash.
* The 1st cut of qlog renewal.
Removed some qlogs, changed some qlogs to MYLOG and added some qlogs.
* Fixed typos.
* Stop build operations on error.
* Use macro QLOG instead of function qlog.
* The second cut of QLOG renewal.
* Move the implemetation of GetExeName() from psqlodbc.c(psqlsetup.c) to mylog.c.
* Remove the GssAuthUseGssapi option completely.
* Fix bug that calls strdup() for NULL pointers.
Per report from Ding, Haiqiang.
* Further Mylog renewal.
* Detect fast shutdown while connecting.
* Fix a compilation failure with nmake since 503bb09.
Report and patch by Michael Paquier.
* Put back the behavior when conversion errors from the current locale to SQLWCHAR occur.
Simply returns zero length string instead of erroring out.
Per report from Andrus.
Also take logs when conversion errors occur.
* Further improvement of qlog.
* Add missing type declaration of log_params().
* Add level parameter to Commlog/Mylog option of setup program.
* Review ER_ReturnError().
* Improve QLOG.
* Add __attribute__((format(printf,3,4))) to the declaration of snprintfcat().
* Move 2 CtrlCheckButton() calls into a switch statement.
* Allow PROCCALL in ReadOnly mode.
Per report from Matej Mihelic.
* Fix compiler warnings.
* Prep release 09.06.0500
* Don't forget to set default values when registering dsn via RegisterRegDsn.
* Fix a compiler warning.
* Fix multibyte handling of ansi driver.
* Handle PG 10 identity columns.
* For PG10 servers, we will never see "unknown" output columns.
Fix regression test catalogfunctions-test for PG10 servers.
* Remove the "unknown" column from colattribute-test regression test.
Because there's no "unknown" output column in PG10 servers, it seems meaningless to test "unknown" case.
* Add some QLOGs.
* Improve @@identty handling.
Use multibyte-aware eatTableIdentifiers() instead of next_name_token().
Use identifierEscape() to escape single quotes or double quotes.
* Fix "unrecognized format function type" warnings in old GCC.
Also use PG_PRINTF_ATTRIBUTE instead of printf in __attribute__((format(printf, .., ..))) function attribute.
* Review the use of encoded_nextchar().
Remove variables which work in conjunction with encstr(encoded_str) so as to avoid misleadingness.
* Use pg_get_serial_sequence() to get serial sequence of identity columns or serial columns. pg_get_serial_sequence() for identity columns became available in PG 10 rc1.
* Review getNextToken() in parse.c.
* Change the return value of strncpy_null() from char * to size_t.
* Change QLOG() so that it calls corresponding MYLOG() as well.
* Improve error handling in info.c.
* Improve the use of SC_error_copy() in info.c.
* Correct CC_set_error_if_not_set().
* Use macro IS_NOT_SPACE() instead of !isspace() to ensure that !isspace() is applied to non-null characters.
* Don't forget to call resetPQExpBuffer() before processing a new query.
* Preparation for development with VC15(VS 2017).
* Correct the use of MatchInfo object which is an output of Select-String.
* Fix the bug that 'create table T_$001 (c)' fails when useServerSidePrepare is turned on.
Per report from Gregory Pruss.
* Prep version 10.00.0000!
* Call Get-VSSetupInstance to detect Visual Studio installations whose version >= 15 when VSSetup module is available.
* Fix my mistake of previous commit.
* Review the handling of @@IDENTITY when a column's default is nextval(a_sequence) but the column isn't a serial. Unfortunately the function pg_get_serial_sequence() doesn't work for sequences which aren't serial type.
* Add add an option -NoPDB to buildInstallers.ps1.
The switch option can be specified so as to exclude PDB files from the installers.
* Use MYLOG instead of inolog in inouealc.c .
* Fix a bug in pgdebug_realloc().
Fix compiler warnings in inouealc.c
* Free any data at exec params before the statement is executed again or the next set of parameters is processed. If not, then there will be a memory leak when the next SQLParamData/SQLPutData is called.
Per report from Mihai Giurgeanu <mihai.giurgeanu@gmail.com>.
* Review the level of MYLOG, QLOG.
Divide *level 1(detail)* log into *level 1(tuple level)* log and *level 2(detail)* log.
* Prep release 10.01.0000
* Fixed typo release document.
* Oops, get_DocumentElement() doesn't return xml type.
* Fix a bug in is_setting_search_path. A pointer might be incremented to point beyond the null terminator.
Report and patch by Grant Shirreffs.
* It is not appropriate to distribute test/Makefile.
The file isn't in git repo and is generated depending on the environment via configure operation.
* It's safer to call setlocale(LC_CTYPE, "") than calling setlocale(LC_ALL, "").
Report and patch by Mario De Frutos.
* Fix build for non-gcc systems
* Avoid replacing effective notice messages.
Report from Wolfgang Apolinarski. Patch by Clemens Ladisch.
* Modify positioned-update-test.
1. Add a SQLSetPos(.., SQL_REFRESH, ..) call so that the test passes SC_pos_reload().
2. Add a primary key to pos-update-test table(KEYSET-DRIVEN cursor needs non null int4/oid unique key).
3. Add expected/positioned-update-test_1.out for KEYSET-DRIVEN cursors.
* Oops, setting *tidval* variable in SC_pos_reload_with_key() was missing by mistake.
* Handle MALLOC/REALLOC errors while fetching tuples more effectively.
Per report from Haruka Takatsuka.
* Make SQLSetPos(SQL_DELETE/SQL_REFRESH) more effective.
Because queries calling currtid(2) like
select .. from .. where ctid=currtid2(.., ..)
cause Seq Scan, their execution may be very slow.
It is better to execute queries using subqueries like
select .. from .. where ctid=(select currtid2(.., ..))
because they cause Tid Scan.
Report and changes by Tsunakawa Takayuki.
* Fix a crash bug in AddDeleted().
Report and patch by Takayuki Tsunakawa.
* Prep release 10.02.0000
* Fixed typo..
* Put back the handling of lock_CC_for_rb variable.
The variable lock_CC_for_rb should be held per connection.
Per report from Ayman Samamry.
* Fix SQLGetTypeInfo() so that it filters SQL_TYPE_DATE, SQL_TYPE_TIME or SQL_TYPE_TIMESTAMP for ODBC 2.x applications.
Per report from Oleg Tonkikh.
* Revise ConfigDSN() so that it handles the 4th parameter(lpszAttribues) correctly.
Per report from Haribabu Kommi.
* Fix a crash bug when handling error messages.
Also modified some error messages.
* Let SQLTables() or SQLTablePrivileges() show partition tables.
* Fix some typos in help messages of regrees.ps1.
Also cleanup the handling of DeclareFetch parameter a little.
* fix build on Solaris using Solaris Studio
* Add a parameter SpecificDsn of regress.ps1.
* Reduce DB access to pg_class or pg_index by caching relhasoids, relhassubclass etc.
It would improve the performance of SQLSetPos() or SQLBulkOperations() very much in some cases.
Per report from Takayuki Tsunakawa.
* Prep release 10.03.0000
* Create an output variable from a shell variable ODBCLIB using AC_SUBST() in configure.ac. The variable is used in test/Makefile.in.
* odbc_config is often missing in ubuntu.
In those cases you can try
configure --with-unixodbc=__without_odbc_config
. If necessary, configure with LDFLAGS and/or CPPFLAGS e.g.
configure "LDFLAGS=-L /usr/lib/x86_64/linux/gnu" --with-unixodbc=__without_odbc_config
.
* Fix compiler warnings.
* Call AC_CHECK_SIZEOF(long int) in configure.ac and always place config.h before sql....h. Due to this change, sqltypes.h of unixODBC can recognize SIZEOF_LONG_INT used in psqlodbc driver.
* Fix compiler warnings in i386-linux-gnu.
* Correct the path name of Visual Studio 2017 tools.
* Review RegisterDsn.
1. Add a new functionality to 'check_dsn'(renamed from 'existCheck').
This option returns 0 when dsn exists,returns -1 when dsn does not exist,
(new) returns -2 when dsn exists but the driver doesn't exist.
2. Add 'reinstall_driver' option. This option is effective when
'check_dsn' option returns -2.
* Remove obsolete maps pointed out by Daniel Cory <dcory@tableau.com>.
1. POWER -> pow
2. CONCAT -> textcat
3. LEFT -> ltrunc
4. RIGHT -> rtrunc
* Remove connSettings option and/or pqopt option from the OutConnectionString parameter of SQLDriverConnect() when each option doesn't exist in InConnectionString parameter.
* Make it possible to separate object trees x86_ANSI_Release, x86_Unicode_Release, x64_ANSI_Release, x64_Unicode_Release, winbuild/test_x86, winbuild/test_x64, installer/x86, installer/x64, installer/psqlodbc-setup/obj and installer/psqlodbc-setup/bin from source tree on Windows.
* Add an option to reinstall the driver.
* Added shell scripts to build binaries, test and build installers for Windows under WSL(Windows Sybsystem for Linux) or cygwin environment.
* Ignore BOM(byte order mark)s when there are BOMs in the input lines of test/reset-db.
* Increase the number of choices for "diff" commands in Windows.
* Fix the regression test failure in odbc-escapes caused by the commit 499fb29b80cfaf60fffd81549b36ec2def1cf21d.
The parameters should be cast because parameters of concat() function are variadic "any".
* Unbuffered-IO in Windows is incredibly slow. Instead call fflush() after fprintf().
* Add an alias DX of *Database* keyword for connection strings to aviod the use of "database" keyword which has a special meaning in some apps or middlewares..
* Fix a bug caused by the previous commit e7be9779ba98b14d4c694acf87c83122780cfa67.
Also use a macro MYLOG() instead of function mylog().
* The Windows binaries of next release will be built using Visual Studio 2017.
* In Postgresql, numeric items without precision are unlimited and there's no natural map between SQL Data types.
Add an option *Numeric(without precision) as*.
* Documentation fix.
* Change the default platform parameter from "x64" to "both" in Windows regression test.
* Fix a bug that SQLSpecialColumns() returns oid/xmin incorrectly when a table does not exist.
Patch by Quan Zongliang.
* Prep release 11.00.0000.
* Correct the rgbInfoValue returned by SQLGetInfo(SQL_TIMEDATE_FUNCTIONS, ..).
Pointed out by Song X. Gao.
* Because the field 'relhasoids' was dropped in PG12, psqlodbc drivers would have some troubles with PG12 servers.
Report and patch by Vladimir Koković.
* Register drivers {PostgreSQL ANSI} and {PostgreSQL Unicode} during installation on 64bit Windows so that users could use the same connection strings in both x86 and x64 environments.
Per report from Grant Shirreffs.
* Correct the rgbInfoValue returned by SQLGetInfo(SQL_LIKE_ESCAPE_CLAUSE, ..).
Pointed out by Grant Shirreffs.
* Fix a typo in SQLForeignKeys-ResultSet-Column.
'deferrablity' should be 'DEFERRABILITY'.
Report from Alexander Roskamp.
* Correct the rgbInfoValue returned by SQLGetInfo(.., SQL_NUMERIC_FUNCTIONS(SQL_SYSTEM_FUNCTIONS or SQL_STRING_FUNCTIONS, ..).
Pointed out by Grant Shirreffs.
* Bug fix: don't forget to set parameter numbers while handling escaped ODBC
functions.
Report and patch by Grant Shirreiffs.
* Fix test_connection() in setup.c so that settings of conn_settings and pqopt option are reflected properly.
* Prep release 11.01.0000
* Fix the bug that SQLGetDescField() for Field SQL_DESC_COUNT returns SQLINTEGER value which should be of type SQLSMALLINT.
* Since commit 778571, SQLGetTypeInfo() filters SQL_TYPE_DATE, SQL_TYPE_TIME and SQL_TYPE_TIMESTAMP for ODBC 2.x applications. However it isn't appropriate to filter them for individual SQLGetTypeInfo(.., SQL_DATE/TIME/TIMESTAMP(9/10/11)) call because Microsoft ODBC driver manager calls SQLGetTypeInfo(.., SQL_TYPE_DATE/TIME/TIMESTAMP(91/92/93)) of ODBC 3.x drivers when ODBC 2.x applications call SQLGetTypeInfo(.., SQL_DATE/TIME/TIMESTAMP(9/10/11)).
Per report from Michael Riksman.
* Added support for scalar functions TIMESTAMPADD(), TIMESTAMPDIFF() and EXTRACT() functions.
* The macro IS_NOT_SPACE() is used for not pointers but integers.
* Fix a crash bug when SQLProcedureColumns() handles satisfies_hash_partition(). The proargmodes column of satisfies_hash_partition()'s pg_proc entry is not null but the proallargtypes column is null. Per report from James.wang <james.wangke@gmail.com>.
* Silence some compiler warnings.
* Prep release 12.00.0000
* Fix result-conversions regression test.
1. Remove tests for abstime type because the type was removed in PG12.
2. Update results for PG12's new floating point output format.
Results for old floating point output format were moved to result-conversions_2.out and result-conversions_3.out.
* Check the format of version number in editConfiguration.ps1.
* Fix the bug that causes Error : A parameter cannot be found that matches parameter name‘ne'.
1. Check BuildResult(the result of drivers build) before building installers.
2. Enclose the command part * Find_VSDir $vc_ver * with parentheses so that
the subsequent * -ne "" * isn't considered to be a parameter.
* Flush stdout before exiting.
* Cope with the removal of pg_class.relhasoids in PG12 correctly when retrieving updatable cursors.
* Update the expected result of odbc-escapes regression test for PG12's new floating point output format.
Old odbc-escapes.out was renamed odbc-escapes_1.out.
* Fix param-conversion and error-rollback regression test in PG12.
Old param-conversions.out was renamed param-conversions_2.out.
Old param-conversions_1.out was renamed param-conversions_3.out.
Old error-rollback.out was renamed error-rollback_1.out.
* Prep release 12.01.0000
* Use diff command of git bash in preference to wsl diff command.
Unfortunately >> (appending redirected output) doesn't work well with wsl.
* Add a new *Display Optional Error Message* option. This option allows to
display error messages other than primary one.
Also add documentaition about the option and *Numeric as* option.
* Handle notice messages in libpq_bind_and_exec(). Sets and resets a notify receiver
around PQexecParams() or PQexecPrepared().
* Ignore PQtransactionStatus PQTRANS_ACTIVE in LIBPQ_update_transaction_status().
PQTRANS_ACTIVE isn't a transaction status.
* Improve execution of parameterized SQL statements with arrays of parameters by sending chunks of SQL statements.
If SQL_ATTR_CURSOR_TYPE of an statement is SQL_CURSOR_FORWARD_ONLY, SQL_ATTR_CONCURRENCY is SQL_CONCUR_READ_ONLY and extended protocol isn't used, the batch execution of the statement is possible.
A new option Batch Size was introduced for such cases.
Batch Size: Split an array (of parameters) into chunks of Batch Size to execute statements. The last chunk may contain less than Batch Size elements. Setting 1 to this option forces the current one by one execution.
Also turn off use_server_side_prepare option temporarily when batch executuion is possible.
* Change SC_execute() so that it returns a return code which is not
affetced by the preceding results. It's necessary for batch execution
with arrays of parameters.
* Add regression test for batch execution.
* Add a new option IgnoreTimeout.
Some tools issue issue SQLSetStmtAttr(.., SQL_ATTR_QUERY_TIMEOUT,,) internally and sometimes it's difficult for users to change the timeout value. You can disable the timeout by turning on this option.
* An improvement for psqlodbc developpers. Make it possible to call some shell scripts from other directories.
* Suppress a warning.
* fixed loop initial declaration used outside C99 mode.
* Prep release 12.02.0000.
* Improve error reporting abuut SC_pos_reload_needed().
* Oops, I forgot to place a line in a macro defintion.
* * Fixed the way joins are identified in the parser * Added to gitignore
* Fix a compilation error in cygwin.
* * Remove the single table restriction in SC_set_SS_columnkey
* Correct the handling of SQL_ROW_ERROR and SQL_ROW_SUCCESS_WITH_INFO.
* Revise the handling of QResultClass list.
Introduce macros QR_concat(), QR_detach() and QR_next().
* Hold the first and last result for parametrized SQL statements with array of parameters. This would improve the performance of bulk inserts/updates etc.
* Fix compilation errors with vc10 caused by the previous commit.
* Add support for development with VC16(Visual Studio 2019).
MSToolsVersion parameter of BuildAll.ps1 and of regress.ps1 are deprecated.
* A code cleaup.
Remove curr_param_result property of StatementClass and separate parsed result from the exec result.
* Fix a compilation error with GCC 10 due to conflicting variable names.
Patch by Paul Wise.
* Suppress some gcc compiler warnings.
* Call AC_CHECK_SIZEOF() or AC_CHECK_TYPES() macros at earlier stage where LIBS variable isn't set yet.
These macros compile and run some programs. On some platforms(with some linker options like
--no-as-needed in Lnux Gnu linker) the programs try to link libraries specified by LIBS variable at run time.
There are some cases that the programs fail due to missing library which is actually not needed and AC_CHECK_SIZEOF() returns 0.
* Fix a compilation error with vc10.
* Cope with the case that openssl libraries link msvc runtimes other than libraries which psqlodbc or libpq links.
* Add support for CONVERT scalar function.
* fixed C99 mode.
* Prep release 13.00.0000.
* fixed typo, per report Hayato Kuroda-san.
* Remove deprected-test from regression test. It is no longer needed
and causes compilation errors in some environments.
* Refactor check for SSL connection
PQgetssl has been discouraged from use since postgres 9.5 since it
will risk false negatives if postgres supports other TLS libraries
than OpenSSL. Refactor to use PQsslInUse which has been available
since 9.5 for just this purpose.
* Fix a bug of CC_send_query_append() when the ignore_roundtrip_time flag is on.
* Add a call for SQLDescribeCol() before SQLExecute() to prepare-test.
The diff of the result was reported by Mangold Fabian and will be fixed in the later commit.
* Add a *update returning* test case to insertreturning regression test.
The diff of the result was reported by Patrick Cheung and will be fixed
in the later commit.
* Let SQLDescribeCol() use parsed result when the current executed result is NULL.
This change fixes the diff of prepare-test regression test reported by Mangold Fabian.
* Let SQLExecute() destroy the old result first.
This change fixes the diff of insertreturning-test regression test
reported by Patrick Cheung.
* Forget to apply disable_convert_func flag to VARCHAR and LONGVARCHAR.
* Prioritize DISABLE_KEEPALIVE checkbox over the disable_keepalive bit of ExtraOptions.
* Format check for ExtraOptions of setup dialog.
* Prep Ver 03.01.0000
* Remove a mylog() call which is a dupilicate of the preceding MYLOG()
macro call.
Also direct use of mylog() should be avoided because mylog() uses lots of CPU.
Report and patch by Marko Ristola.
* We've noticed that the password field on the PostgreSQL Connection
dialog is always focused when empty, even when other fields that appear
earlier on the dialog (and in the tab order) are empty. This is only a
minor annoyance, but it does seem like it would be contrary to the
expectation of most users.
I would propose separating the conditional to inform the user that the
password is required, but still focus the first empty field.
Aaron Spike
* Remove REFCUR_SUPPORT, add FetchRefcursors setting
* Support fetching results from multiple refcursors * Multiple result sets are returned if multiple refcursors are found * Works with both ODBC CALL and PostgreSQL CALL syntaxes * Query must be executed in a transaction to avoid cursors being closed * Now works when output parameters are present * Added fetch-refcursors regression test
* Allow installation and testing of a debug build of the driver (useful for debugging).
Fixed a bug in `regress.ps1` where accepting the default password of
`postgres` did not work.
* Suppress compiler warnings.
* The commit 2e67af added a new ansi test dsn psqlodbc_test_dsn_ansi_debug. So change the way how to determine ansi test driver.
* Named parameter binding support
* Suppress compiler warnings.
* Use ODBC 3 column names for the result set of catalog functions.
* CPTimeout option set to 60 for odbc driver by default
* Prep Release 13.02.0000.
* 1. Fix a bug that SQLGetDiagField(SQL_DIAG_NUMBER) with SQL_HANDLE_DBC returns SQL_NO_DATA
even if an error record exists.
2. Fix a typo "RECISION" which should be "PRECISION".
* Fix FetchRefcursors issues 1. Fix crash if error occurs when fetching noninitial refcursor 2. Fix error when fetching NULL refcursor 3. Return empty result if all refcursors are NULL
* Enable SQLColumnPrivileges functionality.
Add a regression test for SQLColumnPrivileges().
* Currenly SQLColumnPrivileges() call fails. Fix a typo which is the cause.
Patch by foxi_yiyi12081003@outlook.com.
* Prevent cursors being closed prematurely
* Bug fix: SQLColAttribute returns wrong column name - In some circumstances it was returning a name from the previous result
* Define TRUE and FALSE for regression tests in case they aren't defined.
* Prep release 15.00.0000.
* Use autoconf to check for stdbool.h Committer: Dave Cramer <davecramer@gmail.com>
* Make it possible to use standard bool on Windows.
* Prep Relese 16.00.0000.
* use unsigned word for lengths to avoid overflow
* make stapos an unsigned int just in case
* Build and release using github actions
* Use mimalloc to improve performance and reduce memory allocation lock contention (#6)
* Add mimalloc submodule and update build script
* Add steps to build and test with UseMimalloc
* Update mimalloc submodule
* Change UseMimalloc parameter type to switch
* Add ExpectMimalloc parameter
* Fetch mimalloc submodule and use mimalloc parameters
* Prevent MIMALLOC_VERBOSE aborting tests
* Uninstall driver after tests; upload mimalloc artifacts
* add x64 artifacts
* increment version for testing
* use installed version of postgresql to build against
* download win32openssl and build with it
* fix error
* fix error
* get latest windows version from edb
* use same version of openssl to build x64 and x86
* Key caches based on software versions (#13)
* Key caches based on software versions
* Rename cache keys to prevent partial key matches
* Add mimalloc release (#14)
* use openssl64 from slproweb
* Use strdup on non-Windows systems (#17)
* Add workflow version to force PostgreSQL rebuild (#19)
* Fix warnings about caches not being saved (#20)
* Fixed typos in all source code and documentations (#11)
* Fixed bugs, reported in issue #8. (#25)
* Fixed bugs, reported in issue #8.
Bunch of memory leaks, occuring in tests.
One heap-buffer-overrun in read operation at convert.c:3162.
Two memory leaks, detected by my unit tests:
password, conn_settings, pqopt fields overwrite if their values
provided by both, system config and connstring.
Restored reference counting lifetime managment of COL_INFO objects.
Some minor cosmetic changes.
Signed-off-by: Alexandr Kuznetsov <progmachine@xenlab.one>
* Minor cosmetic changes.
Signed-off-by: Alexandr Kuznetsov <progmachine@xenlab.one>
* Forgot set col_info to NULL in TABLE_INFO object while clearing it.
Signed-off-by: Alexandr Kuznetsov <progmachine@xenlab.one>
* Fixing comments.
Signed-off-by: Alexandr Kuznetsov <progmachine@xenlab.one>
---------
Signed-off-by: Alexandr Kuznetsov <progmachine@xenlab.one>
* Support building against VC17 on AMD64 (#9)
* Prevent mimalloc release tag recursively triggering another release (#27)
* build against postgresql version 17_beta2 (#37)
* build against postgresql version 17_BETA2
* use openssl v 3_3_1
* Updated error code returned by SQLGetData function (#35)
* Updated error code returned by SQLGetData function
* use openssl v 3_3_1
---------
Co-authored-by: Carlos García García <cgarciag@denodo.com>
Co-authored-by: Dave Cramer <davecramer@gmail.com>
* only change what is necessary (#12)
* Implementation of SQLSetDescRec & SQLGetDescRec functions (#23)
* Implemented SQLSetDescRec function
- Fixed SQL_DESC_PRECISION field in IPDSetField & IPDGetField functions
- Added support for other fields for bookmark column in ARDSetField
- SQL_DESC_TYPE
- SQL_DESC_DATETIME_INTERVAL_CODE
- SQL_DESC_OCTET_LENGTH
- SQL_DESC_PRECISION
- SQL_DESC_SCALE
* Implemented SQLGetDescRec function
- Handled SQL_NO_DATA case in GetField functions
- Handled 01004 SQLSTATE in GetField functions
- Added support for SQL_DESC_NAME & SQL_DESC_NULLABLE IPDGetField functions
* Implemented SQLGetDescRecW & SQLSetDescRecW functions
- Updated PGAPI_GetFunctions function to get new functions
- Updated psqlodbc.def file for new functions on Windows
- Fixed HY007 error handling
* Added regression test for DescRec functions
---------
Signed-off-by: Alexandr Kuznetsov <progmachine@xenlab.one>
Co-authored-by: Hiroshi Saito <hiroshi@winpg.jp>
Co-authored-by: Hiroshi Inoue <h-inoue@dream.email.ne.jp>
Co-authored-by: Ayappan <ayappap2@in.ibm.com>
Co-authored-by: Maxim Zakharov <dp.maxime@gmail.com>
Co-authored-by: worldleaderpretend <russman7474@gmail.com>
Co-authored-by: Daniel Gustafsson <daniel@yesql.se>
Co-authored-by: Aaron Spike <spikeac@mlc-wels.edu>
Co-authored-by: Adrian Grucza <adrian.grucza@iress.com>
Co-authored-by: Hiroshi Inoue <hinoue205@gmail.com>
Co-authored-by: Vadim <vadim.presniak@bentley.com>
Co-authored-by: Ubuntu <ubuntu@ip-172-30-5-130.ec2.internal>
Co-authored-by: Dave Cramer <davecramer@gmail.com>
Co-authored-by: Adrian Grucza <46910040+apgrucza@users.noreply.github.com>
Co-authored-by: Hunaid Sohail <76044242+Hunaid2000@users.noreply.github.com>
Co-authored-by: Alexandr Kuznetsov <progmachine@xenlab.one>
Co-authored-by: Carlos García <garciagarciacarlos@gmail.com>
Co-authored-by: Carlos García García <cgarciag@denodo.com>
Co-authored-by: Keith Wedinger <keith.wedinger@improving.com>" href="/mirrors/aws-pgsql-odbc/commits/f17456c58b">Pull and merge updates from github.com/postgresql-interfaces/psqlodbc (#15)
1年前pgxalib.cppchore: Merge Upstream 2025-04-21 (#125)1年前pgxalib.defchore: fork psqlodbc v152年前psqlodbc.cUpdate logging messages to be more formal (#66)1年前psqlodbc.defFix driver product name, description, company and version (#69)1年前psqlodbc.dspFix driver product name, description, company and version (#69)1年前psqlodbc.hchore: Merge Upstream 2025-04-21 (#125)1年前psqlodbc.rcchore: bump version to 1.0.2 and update changelog (#161)3个月前psqlodbc.regFix driver product name, description, company and version (#69)1年前psqlodbc.slnFix/improve dialog layouts (#55)1年前psqlodbc.vcprojFix driver product name, description, company and version (#69)1年前psqlodbca.defFix driver product name, description, company and version (#69)1年前psqlsetup.cFix driver product name, description, company and version (#69)1年前psqlsetup.defchore: fork psqlodbc v152年前psqlsetupa.defchore: fork psqlodbc v152年前qresult.cchore: Merge Upstream 2025-04-21 (#125)1年前qresult.hchore: Merge Upstream 2025-04-21 (#125)1年前regress.batchore: fork psqlodbc v152年前resource.hfeat: Failover Integration & DSN GUI (#17)1年前results.cchore: Merge Upstream 2025-04-21 (#125)1年前secure_sscanf.cchore: Merge Upstream 2025-04-21 (#125)1年前secure_sscanf.hchore: Merge Upstream 2025-04-21 (#125)1年前setup.cfix: use aws drv for manage dsn drv (#137)12个月前statement.cchore: Merge Upstream 2025-04-21 (#125)1年前statement.hchore: Merge Upstream 2025-04-21 (#125)1年前tuple.cchore: fork psqlodbc v152年前tuple.hchore: fork psqlodbc v152年前unicode_support.hchore: fork psqlodbc v152年前version.hchore: bump version to 1.0.2 and update changelog (#161)3个月前wbuild.shchore: fork psqlodbc v152年前wconfig.shchore: fork psqlodbc v152年前win64.makFix driver product name, description, company and version (#69)1年前win_setup.hfix: use aws drv for manage dsn drv (#137)12个月前win_unicode.cUpdate logging messages to be more formal (#66)1年前windows-defaults.mak#x27;s in identifiers.
* Fix catalogfunctions-test. The output of catalogfunctions-test was changed along with the change of parse-test.
* Add a test case to parse-test.
* Introduce token control while parsing.
Detect *select .. into* or *select ... for update* and suppress *declare .. cursor for* clause in declare/fetch mode using the mechanism.
* Add __FILE__, __FUNCTION__, __LINE__ to MYLOG.
* Fix an parameter unmatch error which would cause a crash.
* The 1st cut of qlog renewal.
Removed some qlogs, changed some qlogs to MYLOG and added some qlogs.
* Fixed typos.
* Stop build operations on error.
* Use macro QLOG instead of function qlog.
* The second cut of QLOG renewal.
* Move the implemetation of GetExeName() from psqlodbc.c(psqlsetup.c) to mylog.c.
* Remove the GssAuthUseGssapi option completely.
* Fix bug that calls strdup() for NULL pointers.
Per report from Ding, Haiqiang.
* Further Mylog renewal.
* Detect fast shutdown while connecting.
* Fix a compilation failure with nmake since 503bb09.
Report and patch by Michael Paquier.
* Put back the behavior when conversion errors from the current locale to SQLWCHAR occur.
Simply returns zero length string instead of erroring out.
Per report from Andrus.
Also take logs when conversion errors occur.
* Further improvement of qlog.
* Add missing type declaration of log_params().
* Add level parameter to Commlog/Mylog option of setup program.
* Review ER_ReturnError().
* Improve QLOG.
* Add __attribute__((format(printf,3,4))) to the declaration of snprintfcat().
* Move 2 CtrlCheckButton() calls into a switch statement.
* Allow PROCCALL in ReadOnly mode.
Per report from Matej Mihelic.
* Fix compiler warnings.
* Prep release 09.06.0500
* Don't forget to set default values when registering dsn via RegisterRegDsn.
* Fix a compiler warning.
* Fix multibyte handling of ansi driver.
* Handle PG 10 identity columns.
* For PG10 servers, we will never see "unknown" output columns.
Fix regression test catalogfunctions-test for PG10 servers.
* Remove the "unknown" column from colattribute-test regression test.
Because there's no "unknown" output column in PG10 servers, it seems meaningless to test "unknown" case.
* Add some QLOGs.
* Improve @@identty handling.
Use multibyte-aware eatTableIdentifiers() instead of next_name_token().
Use identifierEscape() to escape single quotes or double quotes.
* Fix "unrecognized format function type" warnings in old GCC.
Also use PG_PRINTF_ATTRIBUTE instead of printf in __attribute__((format(printf, .., ..))) function attribute.
* Review the use of encoded_nextchar().
Remove variables which work in conjunction with encstr(encoded_str) so as to avoid misleadingness.
* Use pg_get_serial_sequence() to get serial sequence of identity columns or serial columns. pg_get_serial_sequence() for identity columns became available in PG 10 rc1.
* Review getNextToken() in parse.c.
* Change the return value of strncpy_null() from char * to size_t.
* Change QLOG() so that it calls corresponding MYLOG() as well.
* Improve error handling in info.c.
* Improve the use of SC_error_copy() in info.c.
* Correct CC_set_error_if_not_set().
* Use macro IS_NOT_SPACE() instead of !isspace() to ensure that !isspace() is applied to non-null characters.
* Don't forget to call resetPQExpBuffer() before processing a new query.
* Preparation for development with VC15(VS 2017).
* Correct the use of MatchInfo object which is an output of Select-String.
* Fix the bug that 'create table T_$001 (c)' fails when useServerSidePrepare is turned on.
Per report from Gregory Pruss.
* Prep version 10.00.0000!
* Call Get-VSSetupInstance to detect Visual Studio installations whose version >= 15 when VSSetup module is available.
* Fix my mistake of previous commit.
* Review the handling of @@IDENTITY when a column's default is nextval(a_sequence) but the column isn't a serial. Unfortunately the function pg_get_serial_sequence() doesn't work for sequences which aren't serial type.
* Add add an option -NoPDB to buildInstallers.ps1.
The switch option can be specified so as to exclude PDB files from the installers.
* Use MYLOG instead of inolog in inouealc.c .
* Fix a bug in pgdebug_realloc().
Fix compiler warnings in inouealc.c
* Free any data at exec params before the statement is executed again or the next set of parameters is processed. If not, then there will be a memory leak when the next SQLParamData/SQLPutData is called.
Per report from Mihai Giurgeanu <mihai.giurgeanu@gmail.com>.
* Review the level of MYLOG, QLOG.
Divide *level 1(detail)* log into *level 1(tuple level)* log and *level 2(detail)* log.
* Prep release 10.01.0000
* Fixed typo release document.
* Oops, get_DocumentElement() doesn't return xml type.
* Fix a bug in is_setting_search_path. A pointer might be incremented to point beyond the null terminator.
Report and patch by Grant Shirreffs.
* It is not appropriate to distribute test/Makefile.
The file isn't in git repo and is generated depending on the environment via configure operation.
* It's safer to call setlocale(LC_CTYPE, "") than calling setlocale(LC_ALL, "").
Report and patch by Mario De Frutos.
* Fix build for non-gcc systems
* Avoid replacing effective notice messages.
Report from Wolfgang Apolinarski. Patch by Clemens Ladisch.
* Modify positioned-update-test.
1. Add a SQLSetPos(.., SQL_REFRESH, ..) call so that the test passes SC_pos_reload().
2. Add a primary key to pos-update-test table(KEYSET-DRIVEN cursor needs non null int4/oid unique key).
3. Add expected/positioned-update-test_1.out for KEYSET-DRIVEN cursors.
* Oops, setting *tidval* variable in SC_pos_reload_with_key() was missing by mistake.
* Handle MALLOC/REALLOC errors while fetching tuples more effectively.
Per report from Haruka Takatsuka.
* Make SQLSetPos(SQL_DELETE/SQL_REFRESH) more effective.
Because queries calling currtid(2) like
select .. from .. where ctid=currtid2(.., ..)
cause Seq Scan, their execution may be very slow.
It is better to execute queries using subqueries like
select .. from .. where ctid=(select currtid2(.., ..))
because they cause Tid Scan.
Report and changes by Tsunakawa Takayuki.
* Fix a crash bug in AddDeleted().
Report and patch by Takayuki Tsunakawa.
* Prep release 10.02.0000
* Fixed typo..
* Put back the handling of lock_CC_for_rb variable.
The variable lock_CC_for_rb should be held per connection.
Per report from Ayman Samamry.
* Fix SQLGetTypeInfo() so that it filters SQL_TYPE_DATE, SQL_TYPE_TIME or SQL_TYPE_TIMESTAMP for ODBC 2.x applications.
Per report from Oleg Tonkikh.
* Revise ConfigDSN() so that it handles the 4th parameter(lpszAttribues) correctly.
Per report from Haribabu Kommi.
* Fix a crash bug when handling error messages.
Also modified some error messages.
* Let SQLTables() or SQLTablePrivileges() show partition tables.
* Fix some typos in help messages of regrees.ps1.
Also cleanup the handling of DeclareFetch parameter a little.
* fix build on Solaris using Solaris Studio
* Add a parameter SpecificDsn of regress.ps1.
* Reduce DB access to pg_class or pg_index by caching relhasoids, relhassubclass etc.
It would improve the performance of SQLSetPos() or SQLBulkOperations() very much in some cases.
Per report from Takayuki Tsunakawa.
* Prep release 10.03.0000
* Create an output variable from a shell variable ODBCLIB using AC_SUBST() in configure.ac. The variable is used in test/Makefile.in.
* odbc_config is often missing in ubuntu.
In those cases you can try
configure --with-unixodbc=__without_odbc_config
. If necessary, configure with LDFLAGS and/or CPPFLAGS e.g.
configure "LDFLAGS=-L /usr/lib/x86_64/linux/gnu" --with-unixodbc=__without_odbc_config
.
* Fix compiler warnings.
* Call AC_CHECK_SIZEOF(long int) in configure.ac and always place config.h before sql....h. Due to this change, sqltypes.h of unixODBC can recognize SIZEOF_LONG_INT used in psqlodbc driver.
* Fix compiler warnings in i386-linux-gnu.
* Correct the path name of Visual Studio 2017 tools.
* Review RegisterDsn.
1. Add a new functionality to 'check_dsn'(renamed from 'existCheck').
This option returns 0 when dsn exists,returns -1 when dsn does not exist,
(new) returns -2 when dsn exists but the driver doesn't exist.
2. Add 'reinstall_driver' option. This option is effective when
'check_dsn' option returns -2.
* Remove obsolete maps pointed out by Daniel Cory <dcory@tableau.com>.
1. POWER -> pow
2. CONCAT -> textcat
3. LEFT -> ltrunc
4. RIGHT -> rtrunc
* Remove connSettings option and/or pqopt option from the OutConnectionString parameter of SQLDriverConnect() when each option doesn't exist in InConnectionString parameter.
* Make it possible to separate object trees x86_ANSI_Release, x86_Unicode_Release, x64_ANSI_Release, x64_Unicode_Release, winbuild/test_x86, winbuild/test_x64, installer/x86, installer/x64, installer/psqlodbc-setup/obj and installer/psqlodbc-setup/bin from source tree on Windows.
* Add an option to reinstall the driver.
* Added shell scripts to build binaries, test and build installers for Windows under WSL(Windows Sybsystem for Linux) or cygwin environment.
* Ignore BOM(byte order mark)s when there are BOMs in the input lines of test/reset-db.
* Increase the number of choices for "diff" commands in Windows.
* Fix the regression test failure in odbc-escapes caused by the commit 499fb29b80cfaf60fffd81549b36ec2def1cf21d.
The parameters should be cast because parameters of concat() function are variadic "any".
* Unbuffered-IO in Windows is incredibly slow. Instead call fflush() after fprintf().
* Add an alias DX of *Database* keyword for connection strings to aviod the use of "database" keyword which has a special meaning in some apps or middlewares..
* Fix a bug caused by the previous commit e7be9779ba98b14d4c694acf87c83122780cfa67.
Also use a macro MYLOG() instead of function mylog().
* The Windows binaries of next release will be built using Visual Studio 2017.
* In Postgresql, numeric items without precision are unlimited and there's no natural map between SQL Data types.
Add an option *Numeric(without precision) as*.
* Documentation fix.
* Change the default platform parameter from "x64" to "both" in Windows regression test.
* Fix a bug that SQLSpecialColumns() returns oid/xmin incorrectly when a table does not exist.
Patch by Quan Zongliang.
* Prep release 11.00.0000.
* Correct the rgbInfoValue returned by SQLGetInfo(SQL_TIMEDATE_FUNCTIONS, ..).
Pointed out by Song X. Gao.
* Because the field 'relhasoids' was dropped in PG12, psqlodbc drivers would have some troubles with PG12 servers.
Report and patch by Vladimir Koković.
* Register drivers {PostgreSQL ANSI} and {PostgreSQL Unicode} during installation on 64bit Windows so that users could use the same connection strings in both x86 and x64 environments.
Per report from Grant Shirreffs.
* Correct the rgbInfoValue returned by SQLGetInfo(SQL_LIKE_ESCAPE_CLAUSE, ..).
Pointed out by Grant Shirreffs.
* Fix a typo in SQLForeignKeys-ResultSet-Column.
'deferrablity' should be 'DEFERRABILITY'.
Report from Alexander Roskamp.
* Correct the rgbInfoValue returned by SQLGetInfo(.., SQL_NUMERIC_FUNCTIONS(SQL_SYSTEM_FUNCTIONS or SQL_STRING_FUNCTIONS, ..).
Pointed out by Grant Shirreffs.
* Bug fix: don't forget to set parameter numbers while handling escaped ODBC
functions.
Report and patch by Grant Shirreiffs.
* Fix test_connection() in setup.c so that settings of conn_settings and pqopt option are reflected properly.
* Prep release 11.01.0000
* Fix the bug that SQLGetDescField() for Field SQL_DESC_COUNT returns SQLINTEGER value which should be of type SQLSMALLINT.
* Since commit 778571, SQLGetTypeInfo() filters SQL_TYPE_DATE, SQL_TYPE_TIME and SQL_TYPE_TIMESTAMP for ODBC 2.x applications. However it isn't appropriate to filter them for individual SQLGetTypeInfo(.., SQL_DATE/TIME/TIMESTAMP(9/10/11)) call because Microsoft ODBC driver manager calls SQLGetTypeInfo(.., SQL_TYPE_DATE/TIME/TIMESTAMP(91/92/93)) of ODBC 3.x drivers when ODBC 2.x applications call SQLGetTypeInfo(.., SQL_DATE/TIME/TIMESTAMP(9/10/11)).
Per report from Michael Riksman.
* Added support for scalar functions TIMESTAMPADD(), TIMESTAMPDIFF() and EXTRACT() functions.
* The macro IS_NOT_SPACE() is used for not pointers but integers.
* Fix a crash bug when SQLProcedureColumns() handles satisfies_hash_partition(). The proargmodes column of satisfies_hash_partition()'s pg_proc entry is not null but the proallargtypes column is null. Per report from James.wang <james.wangke@gmail.com>.
* Silence some compiler warnings.
* Prep release 12.00.0000
* Fix result-conversions regression test.
1. Remove tests for abstime type because the type was removed in PG12.
2. Update results for PG12's new floating point output format.
Results for old floating point output format were moved to result-conversions_2.out and result-conversions_3.out.
* Check the format of version number in editConfiguration.ps1.
* Fix the bug that causes Error : A parameter cannot be found that matches parameter name‘ne'.
1. Check BuildResult(the result of drivers build) before building installers.
2. Enclose the command part * Find_VSDir $vc_ver * with parentheses so that
the subsequent * -ne "" * isn't considered to be a parameter.
* Flush stdout before exiting.
* Cope with the removal of pg_class.relhasoids in PG12 correctly when retrieving updatable cursors.
* Update the expected result of odbc-escapes regression test for PG12's new floating point output format.
Old odbc-escapes.out was renamed odbc-escapes_1.out.
* Fix param-conversion and error-rollback regression test in PG12.
Old param-conversions.out was renamed param-conversions_2.out.
Old param-conversions_1.out was renamed param-conversions_3.out.
Old error-rollback.out was renamed error-rollback_1.out.
* Prep release 12.01.0000
* Use diff command of git bash in preference to wsl diff command.
Unfortunately >> (appending redirected output) doesn't work well with wsl.
* Add a new *Display Optional Error Message* option. This option allows to
display error messages other than primary one.
Also add documentaition about the option and *Numeric as* option.
* Handle notice messages in libpq_bind_and_exec(). Sets and resets a notify receiver
around PQexecParams() or PQexecPrepared().
* Ignore PQtransactionStatus PQTRANS_ACTIVE in LIBPQ_update_transaction_status().
PQTRANS_ACTIVE isn't a transaction status.
* Improve execution of parameterized SQL statements with arrays of parameters by sending chunks of SQL statements.
If SQL_ATTR_CURSOR_TYPE of an statement is SQL_CURSOR_FORWARD_ONLY, SQL_ATTR_CONCURRENCY is SQL_CONCUR_READ_ONLY and extended protocol isn't used, the batch execution of the statement is possible.
A new option Batch Size was introduced for such cases.
Batch Size: Split an array (of parameters) into chunks of Batch Size to execute statements. The last chunk may contain less than Batch Size elements. Setting 1 to this option forces the current one by one execution.
Also turn off use_server_side_prepare option temporarily when batch executuion is possible.
* Change SC_execute() so that it returns a return code which is not
affetced by the preceding results. It's necessary for batch execution
with arrays of parameters.
* Add regression test for batch execution.
* Add a new option IgnoreTimeout.
Some tools issue issue SQLSetStmtAttr(.., SQL_ATTR_QUERY_TIMEOUT,,) internally and sometimes it's difficult for users to change the timeout value. You can disable the timeout by turning on this option.
* An improvement for psqlodbc developpers. Make it possible to call some shell scripts from other directories.
* Suppress a warning.
* fixed loop initial declaration used outside C99 mode.
* Prep release 12.02.0000.
* Improve error reporting abuut SC_pos_reload_needed().
* Oops, I forgot to place a line in a macro defintion.
* * Fixed the way joins are identified in the parser * Added to gitignore
* Fix a compilation error in cygwin.
* * Remove the single table restriction in SC_set_SS_columnkey
* Correct the handling of SQL_ROW_ERROR and SQL_ROW_SUCCESS_WITH_INFO.
* Revise the handling of QResultClass list.
Introduce macros QR_concat(), QR_detach() and QR_next().
* Hold the first and last result for parametrized SQL statements with array of parameters. This would improve the performance of bulk inserts/updates etc.
* Fix compilation errors with vc10 caused by the previous commit.
* Add support for development with VC16(Visual Studio 2019).
MSToolsVersion parameter of BuildAll.ps1 and of regress.ps1 are deprecated.
* A code cleaup.
Remove curr_param_result property of StatementClass and separate parsed result from the exec result.
* Fix a compilation error with GCC 10 due to conflicting variable names.
Patch by Paul Wise.
* Suppress some gcc compiler warnings.
* Call AC_CHECK_SIZEOF() or AC_CHECK_TYPES() macros at earlier stage where LIBS variable isn't set yet.
These macros compile and run some programs. On some platforms(with some linker options like
--no-as-needed in Lnux Gnu linker) the programs try to link libraries specified by LIBS variable at run time.
There are some cases that the programs fail due to missing library which is actually not needed and AC_CHECK_SIZEOF() returns 0.
* Fix a compilation error with vc10.
* Cope with the case that openssl libraries link msvc runtimes other than libraries which psqlodbc or libpq links.
* Add support for CONVERT scalar function.
* fixed C99 mode.
* Prep release 13.00.0000.
* fixed typo, per report Hayato Kuroda-san.
* Remove deprected-test from regression test. It is no longer needed
and causes compilation errors in some environments.
* Refactor check for SSL connection
PQgetssl has been discouraged from use since postgres 9.5 since it
will risk false negatives if postgres supports other TLS libraries
than OpenSSL. Refactor to use PQsslInUse which has been available
since 9.5 for just this purpose.
* Fix a bug of CC_send_query_append() when the ignore_roundtrip_time flag is on.
* Add a call for SQLDescribeCol() before SQLExecute() to prepare-test.
The diff of the result was reported by Mangold Fabian and will be fixed in the later commit.
* Add a *update returning* test case to insertreturning regression test.
The diff of the result was reported by Patrick Cheung and will be fixed
in the later commit.
* Let SQLDescribeCol() use parsed result when the current executed result is NULL.
This change fixes the diff of prepare-test regression test reported by Mangold Fabian.
* Let SQLExecute() destroy the old result first.
This change fixes the diff of insertreturning-test regression test
reported by Patrick Cheung.
* Forget to apply disable_convert_func flag to VARCHAR and LONGVARCHAR.
* Prioritize DISABLE_KEEPALIVE checkbox over the disable_keepalive bit of ExtraOptions.
* Format check for ExtraOptions of setup dialog.
* Prep Ver 03.01.0000
* Remove a mylog() call which is a dupilicate of the preceding MYLOG()
macro call.
Also direct use of mylog() should be avoided because mylog() uses lots of CPU.
Report and patch by Marko Ristola.
* We've noticed that the password field on the PostgreSQL Connection
dialog is always focused when empty, even when other fields that appear
earlier on the dialog (and in the tab order) are empty. This is only a
minor annoyance, but it does seem like it would be contrary to the
expectation of most users.
I would propose separating the conditional to inform the user that the
password is required, but still focus the first empty field.
Aaron Spike
* Remove REFCUR_SUPPORT, add FetchRefcursors setting
* Support fetching results from multiple refcursors * Multiple result sets are returned if multiple refcursors are found * Works with both ODBC CALL and PostgreSQL CALL syntaxes * Query must be executed in a transaction to avoid cursors being closed * Now works when output parameters are present * Added fetch-refcursors regression test
* Allow installation and testing of a debug build of the driver (useful for debugging).
Fixed a bug in `regress.ps1` where accepting the default password of
`postgres` did not work.
* Suppress compiler warnings.
* The commit 2e67af added a new ansi test dsn psqlodbc_test_dsn_ansi_debug. So change the way how to determine ansi test driver.
* Named parameter binding support
* Suppress compiler warnings.
* Use ODBC 3 column names for the result set of catalog functions.
* CPTimeout option set to 60 for odbc driver by default
* Prep Release 13.02.0000.
* 1. Fix a bug that SQLGetDiagField(SQL_DIAG_NUMBER) with SQL_HANDLE_DBC returns SQL_NO_DATA
even if an error record exists.
2. Fix a typo "RECISION" which should be "PRECISION".
* Fix FetchRefcursors issues 1. Fix crash if error occurs when fetching noninitial refcursor 2. Fix error when fetching NULL refcursor 3. Return empty result if all refcursors are NULL
* Enable SQLColumnPrivileges functionality.
Add a regression test for SQLColumnPrivileges().
* Currenly SQLColumnPrivileges() call fails. Fix a typo which is the cause.
Patch by foxi_yiyi12081003@outlook.com.
* Prevent cursors being closed prematurely
* Bug fix: SQLColAttribute returns wrong column name - In some circumstances it was returning a name from the previous result
* Define TRUE and FALSE for regression tests in case they aren't defined.
* Prep release 15.00.0000.
* Use autoconf to check for stdbool.h Committer: Dave Cramer <davecramer@gmail.com>
* Make it possible to use standard bool on Windows.
* Prep Relese 16.00.0000.
* use unsigned word for lengths to avoid overflow
* make stapos an unsigned int just in case
* Build and release using github actions
* Use mimalloc to improve performance and reduce memory allocation lock contention (#6)
* Add mimalloc submodule and update build script
* Add steps to build and test with UseMimalloc
* Update mimalloc submodule
* Change UseMimalloc parameter type to switch
* Add ExpectMimalloc parameter
* Fetch mimalloc submodule and use mimalloc parameters
* Prevent MIMALLOC_VERBOSE aborting tests
* Uninstall driver after tests; upload mimalloc artifacts
* add x64 artifacts
* increment version for testing
* use installed version of postgresql to build against
* download win32openssl and build with it
* fix error
* fix error
* get latest windows version from edb
* use same version of openssl to build x64 and x86
* Key caches based on software versions (#13)
* Key caches based on software versions
* Rename cache keys to prevent partial key matches
* Add mimalloc release (#14)
* use openssl64 from slproweb
* Use strdup on non-Windows systems (#17)
* Add workflow version to force PostgreSQL rebuild (#19)
* Fix warnings about caches not being saved (#20)
* Fixed typos in all source code and documentations (#11)
* Fixed bugs, reported in issue #8. (#25)
* Fixed bugs, reported in issue #8.
Bunch of memory leaks, occuring in tests.
One heap-buffer-overrun in read operation at convert.c:3162.
Two memory leaks, detected by my unit tests:
password, conn_settings, pqopt fields overwrite if their values
provided by both, system config and connstring.
Restored reference counting lifetime managment of COL_INFO objects.
Some minor cosmetic changes.
Signed-off-by: Alexandr Kuznetsov <progmachine@xenlab.one>
* Minor cosmetic changes.
Signed-off-by: Alexandr Kuznetsov <progmachine@xenlab.one>
* Forgot set col_info to NULL in TABLE_INFO object while clearing it.
Signed-off-by: Alexandr Kuznetsov <progmachine@xenlab.one>
* Fixing comments.
Signed-off-by: Alexandr Kuznetsov <progmachine@xenlab.one>
---------
Signed-off-by: Alexandr Kuznetsov <progmachine@xenlab.one>
* Support building against VC17 on AMD64 (#9)
* Prevent mimalloc release tag recursively triggering another release (#27)
* build against postgresql version 17_beta2 (#37)
* build against postgresql version 17_BETA2
* use openssl v 3_3_1
* Updated error code returned by SQLGetData function (#35)
* Updated error code returned by SQLGetData function
* use openssl v 3_3_1
---------
Co-authored-by: Carlos García García <cgarciag@denodo.com>
Co-authored-by: Dave Cramer <davecramer@gmail.com>
* only change what is necessary (#12)
* Implementation of SQLSetDescRec & SQLGetDescRec functions (#23)
* Implemented SQLSetDescRec function
- Fixed SQL_DESC_PRECISION field in IPDSetField & IPDGetField functions
- Added support for other fields for bookmark column in ARDSetField
- SQL_DESC_TYPE
- SQL_DESC_DATETIME_INTERVAL_CODE
- SQL_DESC_OCTET_LENGTH
- SQL_DESC_PRECISION
- SQL_DESC_SCALE
* Implemented SQLGetDescRec function
- Handled SQL_NO_DATA case in GetField functions
- Handled 01004 SQLSTATE in GetField functions
- Added support for SQL_DESC_NAME & SQL_DESC_NULLABLE IPDGetField functions
* Implemented SQLGetDescRecW & SQLSetDescRecW functions
- Updated PGAPI_GetFunctions function to get new functions
- Updated psqlodbc.def file for new functions on Windows
- Fixed HY007 error handling
* Added regression test for DescRec functions
* Update main.yml Build against PostgreSQL RC1 (#44)
* Update main.yml Build against PostgreSQL RC1
* Update OPENSSL to 3.3.2
* prepare release notes and update version in configure.ac (#45)
* Fix for issue #47 - double free of COL_INFO object (#48)
* Fix for issue #47 - double free of COL_INFO object due to refcount
breakage during reuse of directly found object in getColumnsInfo(...).
One more possible memory leak of COL_INFO objects in
getColumnsInfo(...).
Signed-off-by: Alexandr Kuznetsov <progmachine@xenlab.one>
* Fix spelling mistake in comment.
Signed-off-by: Alexandr Kuznetsov <progmachine@xenlab.one>
---------
Signed-off-by: Alexandr Kuznetsov <progmachine@xenlab.one>
* release 16_00_0006 bugfix for double free (#50)
* release 16_00_0006 bugfix for double free
* update version numbers for release 17 (#52)
* update version numbers for release 17
* Use REL_17_STABLE (#53)
* Another place where refcnt in the COL_INFO object is unfortunately (#55)
erased.
Signed-off-by: Alexandr Kuznetsov <progmachine@xenlab.one>
* update version numbers to release 16.00.0007 to release a version 16 with the latest memory fixes (#62)
* Fix MSI error messages (#58)
Use the MSI property, not the WiX preprocessor variable (which was also
wrongly used as a property name) so the product name actually appears
in the error message instead of an empty string.
* update version numbers (#63)
* Remove the NMAKE build system for installers (#65)
It stopped working in early 2017 after version 9.6.1.
* Use WiX 5 (#66)
* Make product code automatically random
Instead of externally generating it and using it explicitly.
* Componentize the merge module
This prevents upgrades from leaving files from the previous version
behind that are not in the new version.
* Configure drivers on x64 The Way It Should Be Done
Use the ODBCDriver element only, without additional Registry settings.
This works, although it does not solve the file name issue and therefore
still requires removing the short file names from the File table.
It also works for installing the x86 driver on an x64 system. Whether it
works on an x86 system remains unknown.
* Configure drivers on x86 In The Exact Same Way
Tested on Windows 10 x86; the driver installs correctly and works
at first glance (in Access, to be precise). Registry and file system
look good.
The comment saying it "probably would be safe" is probably correct.
* Use candle's -arch option to select build platform
According to docs, using Package/@Platform "is discouraged". The -arch
option also provides the default bitness for components, making the
Component/@Win64 attribute unnecessary in single-architecture packages.
* Reindent
* Save some attributes
* Replace upgrade logic with MajorUpgrade element
This element compiles into approximately the same entries in the
Upgrade, CustomAction, and InstallExecuteSequence tables.
* Remove unused GUID
I think this was the product code, a long time ago.
* Make MSI file smaller
By about 20 percent.
* Better select where to remove short file names
Use the FileName column itself instead of the file ID. This is less
susceptible to changes in file IDs (and component IDs) that may happen
when relying more on default behaviors in future WiX versions.
* Build with WiX 5
This is a preview. It appears to build a working x64 installer; I have
tested nothing else yet.
* Clean up modify_msi.vbs
Also, put blame where it belongs, which is Windows Installer. If this
was a bug in WiX, then the fix would be to enforce 8.3 file names for
ODBC drivers, and we wouldn't like that very much either, would we?
* Increase WiX-5-ness
- Remove most Component elements in favor of naked files
- Replace PGFOLDER variable with ProgramFiles6432Folder
The Condition element on Component has become an attribute in WiX 5, and
the combination of preprocessor and component condition (i.e. include
a non-x64 condition only in a non-x64 package) to install PGXA only from
a package native to the underlying OS does not work anymore. Replace it
with a pure component condition that includes the package architecture.
The Template summary property has this information already, but it is
not available from within the installation, and I'm not about to start
writing custom actions.
* Update build workflow for WiX 5
* fix small memory leak of 'encoding' char array in 'CC_initial_log' function (#67)
Co-authored-by: iopnc <yus.alekseenko@ao-avtomatika.ru>
* Ignore IntelliJ IDEA project files
* Merge commit update
* Manually merge resource and installer upstream changes
* Update macOS build to account for move of aws-rds-odbc to libs subdirectory
---------
Signed-off-by: Alexandr Kuznetsov <progmachine@xenlab.one>
Co-authored-by: Hiroshi Inoue <h-inoue@dream.email.ne.jp>
Co-authored-by: Hiroshi Saito <hiroshi@winpg.jp>
Co-authored-by: Ayappan <ayappap2@in.ibm.com>
Co-authored-by: Maxim Zakharov <dp.maxime@gmail.com>
Co-authored-by: worldleaderpretend <russman7474@gmail.com>
Co-authored-by: Daniel Gustafsson <daniel@yesql.se>
Co-authored-by: Aaron Spike <spikeac@mlc-wels.edu>
Co-authored-by: Adrian Grucza <adrian.grucza@iress.com>
Co-authored-by: Hiroshi Inoue <hinoue205@gmail.com>
Co-authored-by: Vadim <vadim.presniak@bentley.com>
Co-authored-by: Ubuntu <ubuntu@ip-172-30-5-130.ec2.internal>
Co-authored-by: Dave Cramer <davecramer@gmail.com>
Co-authored-by: Adrian Grucza <46910040+apgrucza@users.noreply.github.com>
Co-authored-by: Hunaid Sohail <76044242+Hunaid2000@users.noreply.github.com>
Co-authored-by: Alexandr Kuznetsov <progmachine@xenlab.one>
Co-authored-by: Carlos García <garciagarciacarlos@gmail.com>
Co-authored-by: Carlos García García <cgarciag@denodo.com>
Co-authored-by: Christian Ullrich <chris@chrullrich.net>
Co-authored-by: iobnc <alexyur88@mail.ru>
Co-authored-by: iopnc <yus.alekseenko@ao-avtomatika.ru>" href="/mirrors/aws-pgsql-odbc/commits/52a6f1bb4e">Merge from postgresql-interfaces/psqlodbc (#23)
1年前winstaller.shchore: fork psqlodbc v152年前wregress.shchore: fork psqlodbc v152年前xalibname.cchore: fork psqlodbc v152年前xalibname.hchore: fork psqlodbc v152年前
Amazon Web Services (AWS) ODBC Driver for PostgreSQL
The Amazon Web Services (AWS) ODBC Driver for PostgreSQL allows an application to take advantage of the features of clustered PostgreSQL databases. It is based on the PostgreSQL ODBC driver. This driver is compatible with the following platforms:
End of Support
Support for this project will end on May 31st 2026 as per our maintenance policy. We recommend migrating to the new AWS Advanced ODBC Wrapper for additional features and support.
Table of Contents
About the Driver
Benefits of the AWS ODBC Driver for PostgreSQL
The official open-source PostgreSQL ODBC driver does not natively support RDS PostgreSQL or Aurora PostgreSQL specific features, such as the various AWS authentication methods, failover or Aurora Limitless Databases. The AWS ODBC Driver for PostgreSQL allows client applications to take advantage of the extra RDS/Aurora database features by implementing support for:
Getting Started
For more information on how to start using the AWS ODBC Driver for PostgreSQL, please visit the Getting Started page.
Build and Test the Driver
Please refer to the AWS Driver’s documentation for details on how to use, build, and test the AWS ODBC Driver for PostgreSQL.
Documentation
Technical documentation regarding the functionality of the AWS ODBC Driver for PostgreSQL will be maintained in this GitHub repository. For additional documentation, please refer to the documentation for the open-source PostgreSQL ODBC driver that the AWS ODBC Driver for PostgreSQL is based on.
Getting Help and Opening Issues
If you encounter an issue or bug with the AWS ODBC Driver for PostgreSQL, we would like to hear about it. Please search the existing issues and see if others are also experiencing the same problem before opening a new issue. When opening a new issue, please make sure to provide:
Please include a reproduction case for the issue when appropriate. Also please include driver logs if possible, as they help us diagnose problems quicker.
The GitHub issues are intended for bug reports and feature requests. Keeping the list of open issues lean will help us respond in a timely manner.
License
This software is released under version 2 of the GNU Lesser General Public License (LGPLv2).