summaryrefslogtreecommitdiff
path: root/odbcapiw.c
AgeCommit message (Collapse)Author
2017-12-26Review the level of MYLOG, QLOG.Hiroshi Inoue
Divide *level 1(detail)* log into *level 1(tuple level)* log and *level 2(detail)* log.
2017-08-27Further Mylog renewal.Hiroshi Inoue
2017-08-16Implement myprintf() which prints logs according to printf format and make ↵Hiroshi Inoue
logs a little easier to read using the macro MYPRINTF() which calls myprintf().
2017-08-15Review the use of mylog().Hiroshi Inoue
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.
2017-05-11Reorganize the language conversion between the current locale and unicode.Hiroshi Inoue
Support the platforms e.g. FreeBSD which satisfies __STDC_UTF_16__ (but not satify __STDC_ISO_10646__) using mbrtoc16() and c16rtomb(). Use the functions bindpara_msg_to_utf8(), bindpara_wchar_to_msg(), bindcol_hybrid_estimate(), bindcol_hybrid_exec(), bindcol_localize_estimate() and bindcol_localize_exec() which hide the difference of platforms instead of platform specific functions. They are implemented using already implemented wstrtomsg(), msgtowstr(), wcs_to_utf8(), utf8_to_wcs_lf() and newly implemented mbstoc16_lf(), c16tomsb(), ucs4_to_ucs2_lf(), ucs2_to_ucs4(). Add eucJP encoding case to wchar-char test. [Minor changes] Add conversion error check between unicode and the current locale. Rename buf to send_buf in ResolveOneParam() so that grep or find can them find easily. Separate "unicode_support.h" from "psqlodbc.h" Change convert_linefeeds() from static to external. Add AC_CHECK_FUNCS(mbrtoc16 c16rtomb) to Makefile.am. Remove win_unicode.c from psqlsetup.vcxproj.
2017-03-17Revise the handling of show oid column and row versioning option.Hiroshi Inoue
2017-03-07Revise recent lost connection check.Hiroshi Inoue
Check the lost connection 1. at the beginning of ODBC APIs. 2. at the beginning of FE-BE communications using extended protocol.
2016-02-27Fix NULL dereferences which causes application crash. Patch by Tsunakawa, ↵Hiroshi Inoue
Takayuki.
2015-01-19Remove long-since obsolete FAR/NEAR decorations from pointers.Heikki Linnakangas
We haven't supported a segmented memory model for ages, probably never.
2014-10-29Merge info30.c and info.cHeikki Linnakangas
We no longer support ODBC 3.0, so these don't need to be separate anymore. This removes some duplicated code at the bottom of each GetInfoAPI. Michael Paquier
2014-10-29Remove support for ODBC versions < 3.51.Heikki Linnakangas
Older versions have been obsolete for a very long time by now. Removing the support lets us get rid of a lot of code that no-one has in practice been even compiling for a long time. Michael Paquier
2014-10-29Remove support for protocol versions older than 3.Heikki Linnakangas
PostgreSQL added support for protocol version 3 in server version 7.4. There's no need to support servers older than that. This simplifies the code a lot, removing a lot of corner cases that haven't been properly regression tested for a long time anyway. Original patch by me, with some tweaks by Michael Paquier.
2014-03-11More whitespace cleanup.Heikki Linnakangas
Make whitespace and indentation more consistent in SQL_API function declarations.
2014-03-11Whitespace and indentation fixes.Heikki Linnakangas
This also changed the file permissions stored in git for a couple of header files, removing the executable bit. Didn't realize they were different from all the others, but apparently my editor decided to change them. Now they're the same as all the other files, which seems good. Michael Paquier and me.
2014-03-10Fix implicit casts between SQLCHAR and char. Don't rely on -Wno-pointer-sign.Heikki Linnakangas
2013-07-10Revise MSDTC support.Hiroshi Inoue
1. Remove pointlessly complicated AsyncThreads stuff. Instead use _beginthread() to clean up threads. 2. Make pgenlist.dll from the structure change of ConnectionClass. The driver dlls exports the functions described in connexp.h which are used by pgenlist.dll. 3. Isolate the current communication path if necessary. While an IAsyncPG object is alive, a ConnectionClass object (hereinafter refered to as conn-obj) is assigned to it. The assignment has to be changed in the following cases. a) SQLDisconnect() is called for the current connection handle which is assigned to an IAsyncPG object. Allocate another conn-obj and move the current communication path (*sock* member of the current conn-obj) to the new conn-obj. The communicaation path is lost from the current conn-obj and the new conn-obj is assigned to the IAsyncPG object. b) Another (global) transaction is about to begin but the current global transaction is not PREPARED yet. Same as case a) but will open a new communication path for the current conn-obj for the subsequent ODBC API calls. c) Another (global) transaction is about to begin and the current global transaction is already PREPARED. Allocate another conn-obj and open a new communication path for the conn-obj. The new conn-obj is assigned to the IAsyncPG object only to issue COMMIT/ROLLBACK PREPARED command. communication pass (*sock* member of the current ConnectionClass object) to the new object and change the state of the current object NOT CONNECTED. The IAsyncPG object uses new object instead of the current object. In case b) the current object will open a new communication path.
2008-07-04The version is now 8.3.0201.Hiroshi Inoue
1. SQLGUID type support thanks to Jan-Willem Goossens. 2. Fix a bug about silently adding a *for read only* clause. 3. Fix a 64bit mode bug about handling of arrays of parameters. 4. Change the implemetatin of SQLForeignKeys() for 8.3+ servers. 5. Not commit the transaction too early in useDeclareFetch mode. 6. Add a cursor open check for SQLPrepare().
2007-08-31The version is now 8.2.0403.Hiroshi Inoue
1. Support SQLColAttribute for MS specific SQL_CA_SS_COLUMN_KEY. Some MS applications use this. 2. Improve the check of updatability of queries by checking if they have multiple tables. 3. Reduce the round trip overhead in FE/BE communications (especially in useDeclareFetch mode). 4. Fix a bug in ResolveOneParam() pointed out by Rainer Bauer. 5. Add a flag which lets SQLTables() show only accessible tables. 6. The unicode driver now can handle utf-16 surrogate pairs.
2007-04-03The version is now 8.2.0205.Hiroshi Inoue
. Append DETAIL messages to GetDiag...() messages. . Use SQL_SUCCEEDED macros so as to simplify the code. . Use lastval() function to replace IDENTITY on 8.1 or later servers. . Remove WSAStartup() and WSACleanup() from DllMain. . Load libpq from the driver's folder. . Use QR_get_value_backend_int/_text() funcs instead of QR_get_value_backend_row(). . Improve the implemetation of SQLSetPos(.., SQL_ADD/SQL_UPDATE) using the 8.2 new feature INSERT/UPDATE .. returning . . Seaparate DTC code as a Delayload DLL.
2006-10-17The version is now 8.2.0104.Hiroshi Inoue
Take 64bit mode into account for the format parameter of (s(n))printf, sscanf etc.
2006-09-11The version is now 8.1.0102Hiroshi Inoue
1. Compensate a loss of report of being Jet when using MS Access. 2. Add NULL <-> "" date converion function for FOXPRO and revise parse/describe/execute mechanism. 3. Miscellaneous type changes for 64 bit drivers.
2006-07-18The version is now 8.2.0006.Hiroshi Inoue
. Add an option to fake Microsoft SQL Server which would improve SERIAL type handling. . Add support for LOGIN_TIMEOUT. . Improve Statement error handling about the reference of Connection error. . Improve the handling BIGINT type in the OSs without having strtoll(). . Support ODBC CONVERT scalar functions in some cases. . Close qlog, mylog files on detach dll. . Improve comunication performance in case of the driver's original socket. . Send a Close message at the end of normal command processing.
2006-06-14The makefile for MSDTC support.Hiroshi Inoue
1. Add MSDTC log option to the setup Dialog. 2. Improve the automatic client encoding for code page 1252.
2006-06-12The version is now 8.2.0005.Hiroshi Inoue
2006-04-27The version is now 8.2.0002.Hiroshi Inoue
1.Prevent SQL injections via ODBC catalog function calls. 2.Fix SQLNumParams problem related to literal or dollar quote. 3.Call libpq in case of Kerberos authentication. 4.Add E' before literal for after 8.1 severs. 5.Return the correct error message in case of no password. 6.Take E'...' literal expression into account. 7.Fix an SQL_C_WCHAR -> numeric type conversion problem. 8.Refine the handling of io or output parameters. 9.Refine the dollar quote handling. 10.Fix the client_encoding mismatch problem. 11.Fix for SQLStatistics returns UNKNOWN instead of real column names.
2006-04-08Commit the changed files from the enhanced branchDave Page
2005-09-19Socket code is removed from the source. Now, psqlodbc driver relies ↵Anoop Kumar
completely on Libpq for the communication.
2005-07-13New version of the driver with libpq based comms layer, courtesy of Anoop ↵Dave Page
Kumar of Pervasive PostgreSQL. Version number bumped, and extra strings modified in the resource file to make it obvious when the libpq version of the driver is being run.
2004-07-21Make the driver ODBC 3 only.Dave Page
2004-02-05[7.3.0208]Hiroshi Inoue
1) Change catalog functions to search 'public' schema if a user tries to search the user named schema and finds no record to return. 2) Set the statement status to STMT_FINISHED(not STMT_PREPARED) if the pre execution causes an error. 3) Adjust null terminator for SQL_C_WCHAR type. 4) Change getCharColumnSize to return max size when the statement has no result. 5) Cache the number of parameters for statements.
2003-10-25[7.03.0201]Hiroshi Inoue
1) Revise the handling of descriptors and implement SQLCopyDesc. 2) Handle data_at_execution columns for SQLSetPos or SQLBulkOperations.
2003-08-271) Fix a bug on SQLSetStmtAttr(.., SQL_CONCURRENCY) reported by Shachar Shemesh.Hiroshi Inoue
2) Apply a patch to changes the storage type of the debug "func" variables to be stored in the constant area of the program(Shachar Shemesh). 3) Correct the column size in case of bytea as LO.
2002-12-161) Separate APD and IPD more explicitly.Hiroshi Inoue
2) Add a conversion functionality between SQL_C_CHAR and SQL_VARBINARY. 3) The first cut of the use of server side prepare. 4) Check if a relation is a view more precisely. 5) Fix a crash bug with no parameter binding for prepare statements with parameter markers(bug report from Han). 6) Fix a bug about SQLGetDiagField(bug report from Han). 7) Add a missing ENTER_STMT_CS at the start of SQLForeignKey().
2002-11-131) Fixed pretty many 'if (..);' lines(my fault sorry).Hiroshi Inoue
2) Add a few #include lines(config.h pthread,h) for *nix. 3) Supress automatic client_encoding setting in some cases.
2002-09-231) Removed most static variables for thread safety.Hiroshi Inoue
2) Trial implementation of the thread safe driver under Windows. 3) Fix a bug about DSN options setting. 4) Fix a bug about Driver options setting. 5) Implement SQLProcedureColumns(). 6) Changed default numeric precision/scale. 7) Fix some memory leaks in Unicode driver. 8) datetime -> timestamp with time zone since 7.0. 9) Change manually started(using begin) transactions never be implicitly committed.
2002-03-081) Implement SQLParamOptions().Hiroshi Inoue
2) Handle Multiple results and implement SQLMoreResult(). 3) Improve multibyte handling thanks to Eiji Tokuya. 4) Add new options. LF <-> CR/LF converion. TRUE is -1 (for VB). 5) Introduce unicode(UCS-2) support. 6) Reduce the length of connection strings. 7) Improve SQLError, SQLGetDiagRec(ODBC 3.0). 8) Implement SQLTablePrivileges(). 9) Miscellaneous changes for ODBC 3.0 support.
2002-03-01Add files for Unicode support.Hiroshi Inoue