summaryrefslogtreecommitdiff
path: root/options.c
AgeCommit message (Collapse)Author
2018-05-23Fix compiler warnings in i386-linux-gnu.Hiroshi Inoue
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-06-10Clean up the use of 'internal' member of StatementClass.Hiroshi Inoue
Give up to roll back 'internal' statements because the functionality is not effectively used. Introduced 'external' instead of 'internal'.
2017-06-07Clean up the use of sprintf(). Replace sprintf() by snprintf() or the macro ↵Hiroshi Inoue
SPRINTF_FIXED().
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-01-21Enable SQLBulkOperations in declare/fetch mode using long (>=12bytes) bookmarks.Hiroshi Inoue
Formerly the driver offered very simple bookmark support -- it is just the current row number. Now the driver offers more verbose bookmarks which contain KeySet informations (CTID (+ OID)). Though they consume 12bytes (row number + CTID) or 16bytes (row number + CTID + OID), they are useful in declare/fetch mode.
2016-11-02Added to commit 7849ba( was a patch by Tsunakawa,Takayuki).Hiroshi Inoue
Now default isolation level is server's default instead of fixed SQL_TXN_READ_COMMITTED. Also reduced the number of round trips using multiple commands.
2016-10-18Allow setting isolation level before the establishment of connection.Hiroshi Inoue
2016-06-17Implement SQL_QUERY_TIMEOUT. Patch by Tsunakawa, Takayuki.Hiroshi Inoue
2015-01-23Fix miscellaneous little issues spotted by Coverity.Heikki Linnakangas
A few were real bugs, although highly unlikely ones. Others were false positives like dead code, but let's be tidy.
2015-01-23Silence a few harmless warnings that clang static analyzer gave.Heikki Linnakangas
2015-01-22Miscellaneous cleanup.Heikki Linnakangas
* Mark functions used only in same file as static. * Remove unused 'encoding' argument from msgtowstr and wstrtoms (all callers passed NULL). * Silence remaining compiler warnings on 64-bit Windows about assigning size_t to int without cast. * Remove superfluous FORMAT_INT4/FORMAT_UINT4 defines. * Remove useless dollar_quote argument from findTag (it was always '$'), and add comment. * Turn OID_NAME into a #define, to avoid a useless sprintf. * Turn the mapFuncs array into structs, for clarity, and add comment.
2015-01-15Don't reset autocommit attribute at SQLDriverConnect.Heikki Linnakangas
It should be possible to call SQLSetConnectAttr to disable autocommit before establishing a connection. It was incorrectly reset when the per-datasource options were read. To fix, move autocommit_public flag from ConnInfo struct to Connection, like we've always done with login_timeout. Also add a test case. Reported by Ivan Zhang
2014-12-31Use libpq for everything.Heikki Linnakangas
Instead of speaking the frontend/backend protocol directly, use libpq's functions for executing queries. This makes it libpq a hard dependency, but removes direct dependencies to SSL and SSPI, and a lot of related code.
2014-12-05On second thoughts, treat a bookmark as a 32-bit integer, not SQLULEN.Heikki Linnakangas
This seems more reliable. Add a test case for SQLBulkOperations(SQL_FETCH_BY_BOOKMARK), although it's disabled because it doesn't seem to work correctly (fetches wrong rows). I don't have the energy to actually fix that now.
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-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-02-22Change to supply non-NULL parameters for SC_set_error().Hiroshi Inoue
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.
2013-06-17Change SQL_ATTR_PARAMS_PROCESSED_PTR attribute which is set by ↵Hiroshi Inoue
SQLSetStmtAttr() from (SQLUINTEGER *) to (SQLULEN *). This fixes the bug reported by Christopf Berg. Also verify similar attributes which were changed from SQL(U)INTEGER (*) to SQL(U)LEN (*) when 64bit ODBC was introduced.
2013-04-24Silence some compiler warnings, when building on Windows.Heikki Linnakangas
2013-04-18Use FORMAT_ULEN to print SQLULENs.Heikki Linnakangas
Silences a compiler warning.
2013-04-18Fix references to 'notice.txt'.Heikki Linnakangas
notice.txt doesn't exist anymore, the copyright and license information is in readme.txt now. Update references in comments.
2010-09-09Correct the handling of dynamic cursors so that they are substituted by ↵Hiroshi Inoue
keyset-driven ones. This fixs the bug report by Werner Kuhnle.
2009-04-04Improve the transactional control under useDeclareFetch mode.Hiroshi Inoue
2008-09-24Suppress some compiler warnings.Hiroshi Inoue
2008-08-09Fix some bugs.Hiroshi Inoue
1. Reset the column binding information after SQLMoreResults(). 2. Save the rowset size properly for the FETCH_NEXT operation in case of >= 3.0 drivers. Enable geqo optiomizer by default.
2007-12-26*** empty log message ***Hiroshi Inoue
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-06-02The version is now 8.2.0402.Hiroshi Inoue
. Fix some bugs in case without MSDTC support. . Refine the realloc handling. . Put back the @@IDENTITY implementation so as not to use lastval(). . Change SQLColumns() to return correct column length in the Unicode driver. . Remove the connection count limitation. . Fix Protocol=7.4--1 notation (should be Protocol=7.4). . Fix a typo in socket.c (bug report from Rainer bauer).
2007-05-04Fixed HANDLE_ENLIST_IN_DTC.Hiroshi Saito
(*nix compile error)
2007-05-02The version is now 8.2.0401.Hiroshi Inoue
[Windows] Handle AUTOCOMMIT mode more carefully in a distributed transaction so as not to issue COMMIT unexpectedly. [UNIX} Allow the UNIX domain configuration (the same as libpq).
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-10-13The version is now 8.2.0103.Hiroshi Inoue
1.Improve the handling of connection error messages. 2.Add an option to convert empty strings to NULL. 3.Handle domain type as the basetype. 4.Fake MSS in case of not only SQLExecute but also SQLParamData. 5.Prevent SQLColumns from displaying system columns. 6.Unload delayLoaded libraries on dll detach (not on disconnect time). 7.Fix a SQLGetDiagField crash bug. 8.Fix a insertion count bug. 9.Take win98 cases into account a little.
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-08-24The version is now 8.2.0.7.Hiroshi Inoue
. Fix some SQLPrimaryKey, SQLForeignKey bugs. Fill PK_NAME or FK_NAME columns. Return right update_rule values. Remove duplicates. . Handle SQL_ALL_SCHEMAS parameter in SQLTables. . Handle unaligned indicator/length buffers more properly. . Fix a bug in ProcedureColumns in case of set returning functions. . Fix a buffer overrun in handle_notice_message (Bart Samuel) . Fix a output parameters problem (Bart Samuel) . Hold the connection lock while a rollbackable statement running. . Add Extra Opts option to the DSN option setupdialog.
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-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
2006-01-31fixed point of failure on x86_64 boxes with PGAPI_SetConnectOptionLudek Finstrle
2005-11-25Cleanup a bunch of inconsistent PGAPI_ declarations/definitionsDave Page
2005-10-20Massive compiler warnings cleanup.Peter Eisentraut
2005-09-19Socket code is removed from the source. Now, psqlodbc driver relies ↵Anoop Kumar
completely on Libpq for the communication.
2005-09-06Re-enable ANSI/Unicode compilation.Dave Page
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.
2005-06-30According to MSDN docs for SQLSetStmtAttr, if you try to request aDave Page
cursor type which isn't supported, the driver should fall back to a supported type, set an appropriate SQLState and return SQL_SUCCESS_WITH_INFO. Currently, if a SQL_ATTR_CURSOR_TYPE of SQL_CURSOR_DYNAMIC is requested, we fall back to SQL_CURSOR_FORWARD_ONLY and no warning is given; this is simply because we don't explicitly check for SQL_CURSOR_DYNAMIC. A better solution is to check for SQL_CURSOR_DYNAMIC, fall back to SQL_CURSOR_KEYSET_DRIVEN and set a warning accordingly. Also, currently if SQL_CURSOR_KEYSET_DRIVEN is requested and only static cursors are supported, we fall back without returning a warning. [Mark G. Adams]