From: Oleg <tonal@aha.ru>
To: pgsql-odbc@postgresql.org
Subject: ODBC 2.0 Bug: wrong timestamp data type
Date: Wed, 25 Apr 2018 19:39:13 +0300
Message-ID: <web-353373047@zbackend1.aha.ru> (raw)
Hello!
I used the latest driver version
(psqlodbc_10_02_0000-x64.zip).
If your application uses ODBC version 2.0. When you
call SQLGetTypeInfo, the driver reports supported data
types that are not available for version 2.0. The first
iteration of the result of this function for the timestamp
data type is SQL_TYPE_TIMESTAMP. If you then call
SQLBindParameter, ODBC Manager returns s1003 (SQL1).log).
The error could be corrected (SQL2.log). To verify this, I
made changes to the function PGAPI_GetTypeInfo: for ODBC
2.0 filter unsupported data types.
---- info.c (1153) ------------------------
QR_set_field_info_v(res, 18, "INTERVAL_PRECISION",
PG_TYPE_INT2, 2);
for (i = 0, sqlType = sqlTypes[0]; sqlType; sqlType =
sqlTypes[++i])
{
pgType = sqltype_to_pgtype(conn, sqlType);
// Filter unsupported data types
if (EN_is_odbc2(env) && (sqlType == SQL_TYPE_DATE ||
sqlType == SQL_TYPE_TIME || sqlType ==
SQL_TYPE_TIMESTAMP))
continue;
if (sqlType == SQL_LONGVARBINARY)
-------------------------------------------
Thank you for listening.
WBR,
Oleg Tonkikh.
Attachments:
SQL1.log (application/octet-stream, 2.0K) download
SQL2.log (application/octet-stream, 1.8K) download
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-odbc@postgresql.org
Cc: tonal@aha.ru
Subject: Re: ODBC 2.0 Bug: wrong timestamp data type
In-Reply-To: <web-353373047@zbackend1.aha.ru>
References: <web-353373047@zbackend1.aha.ru>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox