summaryrefslogtreecommitdiff
path: root/loadlib.c
AgeCommit message (Collapse)Author
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-09Rename snprintf_add() snprintfcat().Hiroshi Inoue
Use SPRINTF_FIXED() or SPRINTFCAT_FIXED() where they are available.
2017-06-02Add or change some mylog messages for debugging.Hiroshi Inoue
2016-11-23In psqlsetup, call both FreeLibrary() and __FUnloadDelayLoadedDLL2() for ↵Hiroshi Inoue
psqlodbc35w(30a) because psqlodbc35w(30a) is explicitly loaded beforehand and delay loaded also.
2016-11-23Give up the use of delayload hook for vc14 or later.Hiroshi Inoue
2016-11-21vc14 seems to have troubles with delayload hook. Load psqlodbc35w(30a) in ↵Hiroshi Inoue
psqlsetup(a) beforehand instead of delayloading.
2016-09-22Build the setup program psqlsetup used for the regression dsn.Hiroshi Inoue
psqlsetup also playes a role to relay ODBC API calls to compiled psqlodbc35w(30a).dll.
2016-07-20The following infomation is from Dave Cramer(davecramer@gmail.com).Hiroshi Inoue
Prior to Visual Studio 2015 Update 3, the hook functions of type PfnDliHook __pfnDliNotifyHook2 and __pfnDliFailureHook2 were non-const. They were made const to improve security (global, writable function pointers are bad). If for backwards compatibility you require the hooks to be writable, define the macro DELAYIMP_INSECURE_WRITABLE_HOOKS prior to including this header and provide your own non-const definition of the hooks.
2015-01-14Silence compiler warnings about variables being used uninitialized.Heikki Linnakangas
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-11-03Fix Windows compilation with libpq enabled, but without SSPIHeikki Linnakangas
GetUserNameEx function requires secur32.dll. It is now referenced in the code, regardless of SSPI, so we need to link with secur32.dll.
2014-10-08Cleanup the code for *test* button and add the functionality to testHiroshi Inoue
MSDTC support.
2014-03-17Replace NOT_USE_LIBPQ with USE_LIBPQ #define.Heikki Linnakangas
This avoids the cumbersome double-negatives, "#ifndef NOT_USE_LIBPQ", making the code easier to read.
2014-03-12Use "function(void)" instead of "function()" to declare 0-arg functions.Heikki Linnakangas
"function(void)" is the correct syntax in a function declaration, although in practice compilers accept the latter too. It's OK in a function definition, but change those too for consistency. Michael Paquier and me.
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-23SSL verify[-(ca|full)] is avaiable since 8.4. There seems no need toHiroshi Inoue
check it. Also there's no need to call lt_dlopen currently.
2014-02-23Currently PQConnectdbParams() not yet used anyway.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-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-08-211.Introduce pgtype_attr_xxxx functions which take a typmod parameter as well ↵Hiroshi Inoue
as a type oid parameter as an extension of pgtype_xxxx functions so that SQLColumns and SQLDescribeCol(SQLColAttrinute) could use common functions. 2.Call PQconnectdbParams instead of PQconnectdb when it's available. 3.Make cursor open check at transaction end a little more effective. 4.Added code for SQL_INTERVAL support and refcursor support though they are disabled.
2010-01-171) Allow password which contains special characters like {,},=,;.Hiroshi Inoue
2) Add a new data source option which makes it possible to use Kerberos for Windows library to reply to GSSAPI authentication request. 3) Native support for SSPI Kerberos or Negaotiate service. It may be useful for the 64-bit drivers. 4) Fix an oversight of Memory overflow handling.
2009-11-23 1) Fix memory leaks on connection failure (Shouji morimoto).Hiroshi Inoue
2) Suppress some compilation errors and warnings.
2009-11-15 1) Added --with(out)-libpq[=DIR} option to configure.Hiroshi Inoue
2) Revise autoconf/automake so that libpq/ssl header/libs are resolved at configure phase. 3) Use md5.c directly instead of win_md5.c. 4) Suppress some compiler warnings.
2009-04-241. Remove the implicit sslverify option and add 'verify-ca' and 'verify-full'Hiroshi Inoue
to the sslmode option. 2. Take the platforms where char is unsigned into account per report from Alex Goncharov.
2009-03-23Change sslverify stuff so that it can be built with older version of libpq.Hiroshi Inoue
2009-03-20The version is now 8.03.0402.Hiroshi Inoue
1. Close (holdable) cursors on commit if possible. 2. Recycle columns cache info if the size becomes pretty large. 3. Add sslverify=none to conninfo in case of SSL connections via libpq of version 8.4. 4. Add a functionality to change the directory for logging. 5. Correct the error code for communication errors.
2008-11-23The version is now 8.3.0401.Hiroshi Inoue
1) Avoid a crash on exit when using SSL connections by resetting CRTPTO_xx_callbacks before unloding libpq. 2) Correct the funtion name DiscardRollbackState pointed out by Zoltan Boszormenyi. 3) Correct the value of INDEX_QUALIFIER column which returned by SLQSTATISTICS();
2008-05-031. Fix a bug in socket which uses a socket variable.Hiroshi Inoue
2. Support column alias without "as" so that links from the SQLServer work. 3. Take ';' into account when the driver adds "for read only" clause. 4. Use the E'.. ' notation not only in '=' expressions but also in LIKE expressions. 5. Change to return milliseconds parts for timestamp fields. 6. Change to return a specific sqlstate in case of multiple parameters.
2008-01-22Fix final FreeLibrary of SSL.Hiroshi Saito
2007-12-26*** empty log message ***Hiroshi Inoue
2007-11-02I may have introduced a bug in the last change which may cause anHiroshi Inoue
infinite loop of trial to use the same (should be lower) version of protocols. Also try to use SSPI service for SSL support when libpq is unavailable.
2007-10-27The version is now 8.2.0501.Hiroshi Inoue
1. Correct the COLUMN_LENGTH return value of SQLColumns() for varchar/bpchar type columns (Unicode driver). 2. Change to not return database name if case of MS Query. 3. The first cut to use Windows SSPI. The trial to use Schannel service for SSL support. 4. Be more careful about <for locking clause> in UseDeclareFetch mode. Add missing? "for read only" clause for read only queries for 8.3 or later servers for safety.
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-04-05. Use different dll name for Unicode and ANSI DTC enlist DLLHiroshi Inoue
so that they can be placed in the same folder. . Simplify the makefile. . Added an experimental makefile for 64bit mode Windows.
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-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-08-27Adjustment of the order of a definition.Hiroshi Saito
2006-04-08Commit the changed files from the enhanced branchDave Page