Dave Page [Mon, 19 Jul 2004 10:19:58 +0000 (10:19 +0000)]
Bump version to 07.05.0001
Peter Eisentraut [Sat, 17 Jul 2004 21:01:07 +0000 (21:01 +0000)]
Some bug fixes in the function mapping table in convert.c. Removed
odbc.sql, because convert.c does its job.
Dave Page [Fri, 16 Jul 2004 08:22:54 +0000 (08:22 +0000)]
Updated a couple of comments
Dave Page [Fri, 16 Jul 2004 07:52:55 +0000 (07:52 +0000)]
Return the required SQLGetInfo buffer size in bytes not characters to prevent memory stomping in Unicode apps.
Peter Eisentraut [Sun, 11 Jul 2004 17:10:22 +0000 (17:10 +0000)]
Make ODBC 0x0300 and Unicode the default on Unix, and fix the compilation in
these modes.
Peter Eisentraut [Sat, 10 Jul 2004 22:26:27 +0000 (22:26 +0000)]
Remove traces of code that tries to compile on Unix without a driver manager.
Look automatically for a driver manager if none is requested explicitly.
Peter Eisentraut [Fri, 9 Jul 2004 18:50:51 +0000 (18:50 +0000)]
Fix buffer overflows related to unchecked make_string().
Dave Page [Wed, 7 Jul 2004 07:55:03 +0000 (07:55 +0000)]
I've looked at the warnings in info.c. The reason of the warnings was macro NULL_IF_NULL defined in info.c:49. (Karol Szkudlarek)
Also removed an unused variable (Dave)
Dave Page [Mon, 5 Jul 2004 09:55:16 +0000 (09:55 +0000)]
Remove unused files. These files are only required for the non-iodbc/non-unixodbc build of the driver on unix which is useless anyway.
Dave Page [Thu, 1 Jul 2004 09:20:56 +0000 (09:20 +0000)]
This patch fixes several misguided assumptions that sizeof(long) == 4, which is not true on 64-bit architectures (Peter Eisentraut)
Dave Page [Mon, 14 Jun 2004 07:40:35 +0000 (07:40 +0000)]
Cleaned up installer.
Dave Page [Sat, 12 Jun 2004 22:02:57 +0000 (22:02 +0000)]
Fix a directory reference that wasn't using an alias.
Dave Page [Sat, 12 Jun 2004 21:38:16 +0000 (21:38 +0000)]
Fix a directory reference that wasn't using an alias.
Dave Page [Wed, 14 Apr 2004 09:17:20 +0000 (09:17 +0000)]
Update version to 07.03.0209
Make the Unicode version the primary and remove others.
Dave Page [Wed, 14 Apr 2004 09:11:56 +0000 (09:11 +0000)]
Update version to 07.03.0209
Make the Unicode version the primary and remove others.
Dave Page [Fri, 9 Apr 2004 18:35:32 +0000 (18:35 +0000)]
Add WIN1250 support - Ludek Finstrle
Dave Page [Fri, 9 Apr 2004 18:13:12 +0000 (18:13 +0000)]
the following patch (against 7.03.0200) contains two things:
- The first hunk is necessary to build psqlodbc using Borland C++ Builder 6.0 [I successfully built the whole DLL, which requires a few other patches]
- The second hunk is necessary as Borland's sscanf would do all sorts of things with rest[] when CodeGuard is active (I wonder if it's not their way of hinting that we have an opportunity for a buffer overrun here).
Cyrille Ch?p?lov <cyrille@softek.fr>
Bruce Momjian [Tue, 6 Apr 2004 14:22:02 +0000 (14:22 +0000)]
When compile and start using psqlodbc.so, it crashes with missing export
QR_get_value_backend_row().
I think there is a missing #include "qresult.h" in multibyte.c
Best Regards,
Georgi Kolev
Dave Page [Mon, 5 Apr 2004 13:07:08 +0000 (13:07 +0000)]
Fix for invalid input syntax for type tid: '(,)' - Jose' Cruanyes
Hiroshi Inoue [Thu, 5 Feb 2004 09:11:44 +0000 (09:11 +0000)]
[7.3.0208]
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.
Dave Page [Wed, 4 Feb 2004 08:55:28 +0000 (08:55 +0000)]
[Jon Willeke] I'm attaching a few tweaks to build psqlodbc with Unicode support on Unix. I changed some code that assumes two-byte SQLWCHAR and I changed configure.ac and Makefile.am, as necessary.
I tested this with unixODBC 2.2.7 on SuSE Linux 8.2. I built unixODBC --with-iconv-ucode-enc=UCS-4LE and with SQL_WCHART_CONVERT defined, so that SQLWCHAR is wchar_t. I have not tested it with UCS-2 / unsigned short.
I also tested this with iODBC 3.51.1, which always uses wchar_t on Unix.
One caveat, if anyone actually plays with this: sqlext.h should include sqlucode.h, so I haven't patched psqlodbc to do so. The next release of unixODBC will contain this fix, and I've mentioned it to the iODBC maintainer.
Hiroshi Inoue [Tue, 6 Jan 2004 09:58:22 +0000 (09:58 +0000)]
1) Correct the handling of SQL_C_ULONG (for *nix).
2) Prevent plan deallocation errors when the transaction
is in abort status.
3) Avoid a connection failure when notice message arrives.
4) Improve the handling of mutex(critical section).
5) Correct the cursor open check.
6) Change the Unicode driver to set the NULL terminator
of SQL_C_WCHAR type data properly.
7) Add some m(re)alloc error check.
8) Add proper cleanup steps for some functions.
9) Return proper min & max scale for timestamp data type.
10) Return proper scale for timestamp data fields.
11) Fix the bug that .009 numeric generates .9 output. (George A.J)
Hiroshi Inoue [Tue, 9 Dec 2003 10:01:38 +0000 (10:01 +0000)]
[7.3.0205]
(for *nix)
1. Detect -lsocket for some platforms.
2. Handle unix domain sockets.
3. EINTR safety for send/recv.
4. Set TCP_NDEALY option for inet connections.
<1-4: thanks to Hartmut Raschick>
5. Use recursive mutex if possible.
6. Add descriptor.c to Makefile.
(for Windows)
7. Automatic setting of client encoding for latin1(9).
(common)
8. Avoid those notorious core dumps when logging on hitting
"null" data...
<8: thanls to Hartmut Raschick>
9. Removed a static varible for thread-safety.
10. Improve the performance of keyset-driven fetch operation.
11. Map (var)char type to SQL type more properly.
12. Change create_params for NUMERIC type to (precison, scale).
13. Add type cast to remove some compiler warnings.
Hiroshi Inoue [Wed, 12 Nov 2003 10:15:21 +0000 (10:15 +0000)]
[7.03.0204]
1) Clear statements' cursors on commit/rollback.
2) Change SQLColumns, SQLTablePrivileges to take show_system_tables
option into account.
3) When an ODBC 2.x application working with an ODBC 3.x driver
calls SQLExecDirect, SQLExecute, or SQLParamData, and a searched
update or delete statement was executed but did not affect any
rows at the data source, the ODBC 3.x driver should return
SQL_SUCCESS. When an ODBC 3.x application working with an ODBC
3.x driver calls SQLExecDirect, SQLExecute, or SQLParamData
with the same result, the ODBC 3.x driver should return
SQL_NO_DATA.
Hiroshi Inoue [Mon, 10 Nov 2003 07:10:07 +0000 (07:10 +0000)]
[7.03.0203]
1) Add conversion from text to SQL_C_BINARY(bug report from Brad Wilson).
2) Change SQLColumns, SQLTables etc to initialize the statement handle
properly(bug report from Yutaka Tanida).
3) Improve the handling of mutex under *nix(bug report from Steve Wampler).
Hiroshi Inoue [Thu, 6 Nov 2003 01:35:02 +0000 (01:35 +0000)]
[7.03.0202]
1) Improve SQLColAttributes(SQL_COLUMN_DISPLAY_SIZE) (bug report from Benjamin Riefenstahl).
2) Correct EN_set_odbc3 macro (bug report from tomas@nocrew.org(Tomas Skäre)).
Hiroshi Inoue [Sat, 25 Oct 2003 04:19:23 +0000 (04:19 +0000)]
[7.03.0201]
1) Revise the handling of descriptors and implement SQLCopyDesc.
2) Handle data_at_execution columns for SQLSetPos or SQLBulkOperations.
Dave Page [Wed, 22 Oct 2003 13:32:58 +0000 (13:32 +0000)]
Version number bump.
Dave Page [Wed, 22 Oct 2003 13:08:49 +0000 (13:08 +0000)]
Version number bump.
Hiroshi Inoue [Mon, 20 Oct 2003 02:37:42 +0000 (02:37 +0000)]
[7.03.0116]
1. Fix a memory leak in case of updatable KEYSET_DRIVEN cursors.
2. Change SQLMoreResults to initialize the cursor position.
3. Hopefully, SQLDescribeCol() returns a more appropriate
error code(SQLSTATE).
Bruce Momjian [Wed, 24 Sep 2003 03:47:30 +0000 (03:47 +0000)]
Remove trailing commas in structs; reported by jason dang
Hiroshi Inoue [Fri, 19 Sep 2003 09:25:17 +0000 (09:25 +0000)]
1) Correct the return info for SQLGetInfo(.., SQL_CURSOR_COMMIT
(ROLLBACK)_BEHAVIOR) call.
2) Explictly reject the SQLBrowseConnect call.
Hiroshi Inoue [Mon, 15 Sep 2003 08:25:03 +0000 (08:25 +0000)]
1. Serialize the connection use for communication(multi-thread).
2. Let escape strings case-insensitive.
Hiroshi Inoue [Tue, 2 Sep 2003 11:25:53 +0000 (11:25 +0000)]
Fix a bug when handling data_at_execution parameter array
reported by Jol Valentine <jolv@genaware.com>.
Hiroshi Inoue [Wed, 27 Aug 2003 10:17:53 +0000 (10:17 +0000)]
1) Fix a bug on SQLSetStmtAttr(.., SQL_CONCURRENCY) reported by Shachar Shemesh.
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.
Hiroshi Inoue [Thu, 31 Jul 2003 01:57:50 +0000 (01:57 +0000)]
1) Distinguish the rowset size for SQLFetch(Scroll) from that for
SQLExtendedFetch.
2) Implement SQLGetDiagFieldW() for the Unicode driver.
Hiroshi Inoue [Fri, 11 Jul 2003 10:47:17 +0000 (10:47 +0000)]
Improve SQLGetDiagField so that an MFC appliaction reports
error messages properly(bug report from Silvio Scarpati).
Hiroshi Inoue [Wed, 9 Jul 2003 08:09:11 +0000 (08:09 +0000)]
Add quotes around table names to use ::regclass in parse.c .
Hiroshi Inoue [Mon, 30 Jun 2003 03:51:24 +0000 (03:51 +0000)]
Change SQLGetFunctions to contain ODBC3 APIs.
Dave Page [Thu, 19 Jun 2003 16:10:20 +0000 (16:10 +0000)]
When doing an UPDATE or DELETE via ODBC, if no records are affected then SQLExecute should return SQL_NO_DATA_FOUND and not SQL_SUCCESS.
The following patch to RH9 applies to the version in CVS (with an offset). This patch has been tested on RH9.
[Tim Woodall]
Dave Page [Wed, 18 Jun 2003 13:24:23 +0000 (13:24 +0000)]
Fix incorrect patch.
Dave Page [Wed, 18 Jun 2003 12:57:58 +0000 (12:57 +0000)]
Fix misplaced comment end.
Dave Page [Wed, 18 Jun 2003 12:49:21 +0000 (12:49 +0000)]
when a column SQL_C_CHAR is handled in ResolveOneParam, the conversion
is coded dependent on param_sqltype. If a SQL_CHAR variable is bound to
it, no conversion takes place, which is incorrect. ODBC architecture
assumes sqltype to be the server_encoding, but this is irrelevant for
pgsql. Instead, everything is done with client_encoding (anything but
UNICODE doesn't make sense here), so we need a conversion to UTF-8 in
any case.
[Andreas Pflug]
Dave Page [Wed, 18 Jun 2003 12:48:18 +0000 (12:48 +0000)]
When converting the value zero, the result is wrong: it is converted to
"" or ".", depending on the precision.
The attached patch insures a zero to be added, so this converts to "0"
or "0."
[Andreas Pflug]
Hiroshi Inoue [Fri, 30 May 2003 02:30:33 +0000 (02:30 +0000)]
1) Improve the SQL_C_VARBOOKMARK type handling.
2) Cleanup copy_and_convert_field() a little.
3) Set an error number and an error message for SQLAllocHandle(
SQL_HANDLE_DESC).
Hiroshi Inoue [Wed, 28 May 2003 02:26:37 +0000 (02:26 +0000)]
Fix a bug about a bookmark handling in SQLBulkOperaitons(SQL_ADD,..)
Hiroshi Inoue [Tue, 27 May 2003 23:23:41 +0000 (23:23 +0000)]
Remove date cast(::date) from the conversion of {d escape before
7.3 servers. 7.2 servers are poor in implicit cast from date ->
timestamp without time zone.
Hiroshi Inoue [Tue, 27 May 2003 05:20:09 +0000 (05:20 +0000)]
1) Corrent the handling of bookmark in SQLBulkOperations.
2) Correct the calculation of a global index in SC_pos_add.
3) Cleanup global/rowset/resultset index handling a little.
Hiroshi Inoue [Mon, 26 May 2003 00:47:50 +0000 (00:47 +0000)]
Correct a handling of offset in SQLBulkOperations.
Hiroshi Inoue [Tue, 20 May 2003 14:11:22 +0000 (14:11 +0000)]
Fix a crash bug in SQLDriverConnect().
Hiroshi Inoue [Tue, 20 May 2003 10:39:28 +0000 (10:39 +0000)]
The previous change wasn't in time of 7.3.0100.
It belongs to 7.03.0101.
Hiroshi Inoue [Mon, 19 May 2003 10:12:09 +0000 (10:12 +0000)]
1) Revert a *int8 as* DSN option to *numeric* for MS Jet.
2) Add a SQL_CA2_SENSITIVITY_ADDTIONS mask to the reply for
SQLGetInfo(.., SQL_ATTR_KEYSET_DRIVEN_CURSOR_ATTRIBUTES2)
which would make a little OpenOffice happy.
3) Fix a bug in SQLGetInfo(.., SQL_ATTR_ROW_NUMBER) for keyset_driven
cursors.
Hiroshi Inoue [Sun, 18 May 2003 00:39:25 +0000 (00:39 +0000)]
Fix a bug in SQLForeignKeys().
Dave Page [Thu, 15 May 2003 16:06:21 +0000 (16:06 +0000)]
Updates for 07.03.0100
Dave Page [Thu, 15 May 2003 15:53:13 +0000 (15:53 +0000)]
Include correct .def and .mak files.
Hiroshi Inoue [Thu, 15 May 2003 14:33:51 +0000 (14:33 +0000)]
Change .mak files.
Hiroshi Inoue [Thu, 15 May 2003 14:14:46 +0000 (14:14 +0000)]
Change the .def and .mak files.
Dave Page [Thu, 15 May 2003 09:00:54 +0000 (09:00 +0000)]
Updates for 07.03.0100
Dave Page [Thu, 15 May 2003 08:45:43 +0000 (08:45 +0000)]
Use the default driver for the setup.
Dave Page [Thu, 15 May 2003 08:39:04 +0000 (08:39 +0000)]
Updates for 07.03.0100
Dave Page [Thu, 15 May 2003 08:24:40 +0000 (08:24 +0000)]
Updates for 07.03.0100
Dave Page [Thu, 15 May 2003 08:00:24 +0000 (08:00 +0000)]
Updates for 07.03.0001
Dave Page [Thu, 15 May 2003 07:38:16 +0000 (07:38 +0000)]
Updates for 07.03.0001
Hiroshi Inoue [Wed, 14 May 2003 23:45:54 +0000 (23:45 +0000)]
Fix compilation errors for the ODBC2.50 driver.
Dave Page [Wed, 14 May 2003 18:38:27 +0000 (18:38 +0000)]
Updates for 07.03.0001
Dave Page [Wed, 14 May 2003 18:32:58 +0000 (18:32 +0000)]
Updates for 07.03.0001
Dave Page [Wed, 14 May 2003 18:16:16 +0000 (18:16 +0000)]
Update registry files to promote the ODBC3 driver to the default, and demote the 2.5 to legacy status.
Hiroshi Inoue [Wed, 14 May 2003 01:32:32 +0000 (01:32 +0000)]
Add a Manage(DSN) button to the English config dialog thanks to
Hiroshi Saito.
Hiroshi Inoue [Tue, 13 May 2003 01:38:39 +0000 (01:38 +0000)]
Change some japanese resource settings thanks to Hiroshi Saito.
Hiroshi Inoue [Mon, 12 May 2003 15:44:08 +0000 (15:44 +0000)]
1) Add a *bytea as LO* DSN option button.
2) Add japanese resources to psqlodbc.rc.
3) Add a dialog for the driver change.
Hiroshi Inoue [Wed, 23 Apr 2003 09:49:47 +0000 (09:49 +0000)]
1) Avoid password leak in the log.
2) Reduce time() calls for the performance.
3) Improve the handling of per Driver resource.
4) #define HAVE_STRTOLL
etc.
Bruce Momjian [Mon, 24 Mar 2003 19:15:26 +0000 (19:15 +0000)]
Add pg_catalog schema prefix to most queries that access system tables.
Hiroshi Inoue [Mon, 24 Feb 2003 01:06:32 +0000 (01:06 +0000)]
Change the macro ATOI64U to mean strtoull under unix(my fault).
Hiroshi Inoue [Tue, 11 Feb 2003 16:57:50 +0000 (16:57 +0000)]
1) Handle SQL_C_CHAR under Unicode driver.
2) Improve ? SQLSpecialColumns for views.
Hiroshi Inoue [Tue, 11 Feb 2003 08:27:29 +0000 (08:27 +0000)]
Add extra 2 digits to the precision of floating numbers.
Hiroshi Inoue [Tue, 11 Feb 2003 00:38:38 +0000 (00:38 +0000)]
Fix a bug in parse_statement reported by Ocke Janssen <Ocke.Janssen@sun.com>.
Hiroshi Inoue [Tue, 11 Feb 2003 00:08:53 +0000 (00:08 +0000)]
Introduce the bigint support under *nix.
Hiroshi Inoue [Mon, 10 Feb 2003 15:13:45 +0000 (15:13 +0000)]
Handle the TableType parameter of SQLTables() as case insensitive.
Hiroshi Inoue [Mon, 10 Feb 2003 04:34:49 +0000 (04:34 +0000)]
Where char may contain a negative value, it should explicitly be
declared as signed char (Oliver Elphick).
Hiroshi Inoue [Wed, 5 Feb 2003 01:21:01 +0000 (01:21 +0000)]
Deprecate ODBC2.X functions for the ODBC 3 driver.
Hiroshi Inoue [Mon, 3 Feb 2003 03:10:44 +0000 (03:10 +0000)]
Fix a bug about multibyte check.
Dave Page [Mon, 27 Jan 2003 10:35:33 +0000 (10:35 +0000)]
Include the Windows file setup.c in the tarball per suggestion from Andreas Pflug
Dave Page [Mon, 27 Jan 2003 10:34:56 +0000 (10:34 +0000)]
Note that windows users shouldn't include md5.c in their projects per suggestion from Andreas Pflug
Bruce Momjian [Wed, 8 Jan 2003 14:56:12 +0000 (14:56 +0000)]
Fix foreign key sytnax bug, patch from Wes Griffin.
Bruce Momjian [Fri, 3 Jan 2003 21:17:59 +0000 (21:17 +0000)]
Create two aliases for pg_namespace, and clarify some of the alias tags.
Hiroshi Inoue [Fri, 3 Jan 2003 16:08:14 +0000 (16:08 +0000)]
Put back the MAX_INFO_STRING value.
Bruce Momjian [Thu, 2 Jan 2003 22:30:13 +0000 (22:30 +0000)]
For the ODBC driver psqlodbc.dll version 7.02.0003 there is an error in
the info.c. In 2 places the SQL contains an alias in the FROM clause
for the pg_namespace table and then references the table in the where
clause. The below cut from the info.c file should replace all instances
on pg_namespace. in the where clause with pn.
Additional cleanups of adding pg_namespace in FROM when referenced in
WHERE.
Jim Holliday
Dave Page [Thu, 2 Jan 2003 15:33:19 +0000 (15:33 +0000)]
Safely fix buffer overrun in PGAPI_GetInfo with strings like:
07.02.0005 PostgreSQL 7.3 on i386-redhat-linux-gnu, compiled by GCC i386-redhat-linux-gcc (GCC) 3.2.1
20021207 (Red Hat Linux 8.0 3.2.1-2)
See https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=80394 for more details.
Dave Page [Thu, 2 Jan 2003 11:45:41 +0000 (11:45 +0000)]
Increase MAX_INFO_STRING to 256 to avoid errors with long info strings such as:
07.02.0005 PostgreSQL 7.3 on i386-redhat-linux-gnu, compiled by GCC i386-redhat-linux-gcc (GCC) 3.2.1
20021207 (Red Hat Linux 8.0 3.2.1-2)
See https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=80394 for more details.
Hiroshi Inoue [Tue, 31 Dec 2002 00:28:25 +0000 (00:28 +0000)]
The preparation of ODBC3 support under *nix.
Hiroshi Inoue [Sat, 28 Dec 2002 00:21:01 +0000 (00:21 +0000)]
1) Removed a strange error message for the SQLPrepare(.., "", SQL_NTS)
statements.
2) Check the range of RecNumber parameter for SQLS(G)etDescField
more strictly.
Both were pointed out by Han zhouhanok@vip.sina.com.
Hiroshi Inoue [Fri, 20 Dec 2002 08:30:04 +0000 (08:30 +0000)]
Change SQLFreeStmt(.., SQL_CLOSE) to not DEALLOCATE prepared statements.
Hiroshi Inoue [Tue, 17 Dec 2002 14:38:23 +0000 (14:38 +0000)]
Add a new *Server side prepare* option.
Hiroshi Inoue [Mon, 16 Dec 2002 15:01:34 +0000 (15:01 +0000)]
1) Separate APD and IPD more explicitly.
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().
Dave Page [Fri, 6 Dec 2002 14:07:06 +0000 (14:07 +0000)]
Ignore dropped columns for 7.3 databases.
Dave Page [Fri, 29 Nov 2002 13:27:30 +0000 (13:27 +0000)]
no message
Dave Page [Fri, 29 Nov 2002 13:04:54 +0000 (13:04 +0000)]
Removed unused win32w.mak makefile
Dave Page [Fri, 29 Nov 2002 12:57:59 +0000 (12:57 +0000)]
Updated version number for 07.02.0005
Hiroshi Inoue [Wed, 27 Nov 2002 09:30:53 +0000 (09:30 +0000)]
Upgrade to 7.2.0005.
Hiroshi Inoue [Tue, 26 Nov 2002 05:48:22 +0000 (05:48 +0000)]
Change CURSOR_TYPE or CONCURRENCY statement attribute to
be reset on cursor close per bug report from Glen Parker.