From: psqlodbc-bugs@pgfoundry.org
To: noreply@pgfoundry.org
Subject: [psqlodbc-Bugs][1010745] ODBC Interval data types are not implemented natively
Date: Thu, 22 Jan 2015 07:21:24 +0000 (UTC)
Message-ID: <20150122072124.C9BEBDBABB4@pgfoundry.org> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-odbc>
psqlodbc-Bugs item #1010745, was changed at 2015-01-22 09:21 by Heikki Linnakangas
You can respond by visiting:
http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1010745&group_id=1000125
Or by replying to this e-mail entering your response between the following markers:
#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+
(enter your response here, only in plain text format)
#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+
>Status: Closed
Priority: 3
Submitted By: Farid Zidan (faridz)
Assigned to: Nobody (None)
Summary: ODBC Interval data types are not implemented natively
Category: None
Group: None
>Resolution: Out of Date
Category: None
Group: None
>Resolution: None
Initial Comment:
PostgreSQL ANSI ODBC driver 8.04.01.00 does not implement ODBC interval data types. Example,
create table TEST_INTERVAL (
INTERVALOID SERIAL not null,
COL1 INTERVAL month null,
COL2 interval year null,
COL3 interval year to month null,
COL4 interval day null,
COL5 interval day to hour null,
COL6 interval day to minute null,
COL7 interval day to second(0) null,
COL8 interval day to second null,
COL9 interval hour null,
COL10 interval hour to minute null,
COL11 interval hour to second(0) null,
COL12 interval hour to second null,
COL13 interval minute null,
COL14 interval minute to second(0) null,
COL15 interval minute to second null,
COL16 interval second(0) null,
COL17 interval second null,
COL18 interval second(3) null,
constraint PK_TEST_INTERVAL primary key (INTERVALOID)
);
I get the following data type information from SQLColAttribute when describing the resultset for select * from test_interval
for SQL_DESC_TYPE_NAME and SQL_DESC_CONCISE_TYPE:
serial SQL_INTEGER
unknown(2000) SQL_VARCHAR
unknown(2000) SQL_VARCHAR
unknown(2000) SQL_VARCHAR
unknown(2000) SQL_VARCHAR
unknown(2000) SQL_VARCHAR
unknown(2000) SQL_VARCHAR
unknown(2000) SQL_VARCHAR
unknown(2000) SQL_VARCHAR
unknown(2000) SQL_VARCHAR
unknown(2000) SQL_VARCHAR
unknown(2000) SQL_VARCHAR
unknown(2000) SQL_VARCHAR
unknown(2000) SQL_VARCHAR
unknown(2000) SQL_VARCHAR
unknown(2000) SQL_VARCHAR
unknown(2000) SQL_VARCHAR
unknown(2000) SQL_VARCHAR
unknown(2000) SQL_VARCHAR
I should be getting the data type name and the following ODBC data types
SQL_INTEGER
SQL_INTERVAL_MONTH
SQL_INTERVAL_YEAR
SQL_INTERVAL_YEAR_TO_MONTH
SQL_INTERVAL_DAY
SQL_INTERVAL_DAY_TO_HOUR
SQL_INTERVAL_DAY_TO_MINUTE
SQL_INTERVAL_DAY_TO_SECOND
SQL_INTERVAL_DAY_TO_SECOND
SQL_INTERVAL_HOUR
SQL_INTERVAL_HOUR_TO_MINUTE
SQL_INTERVAL_HOUR_TO_SECOND
SQL_INTERVAL_HOUR_TO_SECOND
SQL_INTERVAL_MINUTE
SQL_INTERVAL_MINUTE_TO_SECOND
SQL_INTERVAL_MINUTE_TO_SECOND
SQL_INTERVAL_SECOND
SQL_INTERVAL_SECOND
SQL_INTERVAL_SECOND
So I can bind the interval columns to SQL_C_INTERVAL target and then use
SQLColAttribute SQL_DESC_PRECISION and
SQLGetDescField SQL_DESC_DATETIME_INTERVAL_PRECISION to get/set the column leading field and trailing field precision per ODBC spec
http://msdn.microsoft.com/en-us/library/ms716251(VS.85).aspx
----------------------------------------------------------------------
>Comment By: Heikki Linnakangas (hlinnaka)
Date: 2015-01-22 09:21
Message:
Seems to work now. Dunno when it was fixed/implemented..
----------------------------------------------------------------------
You can respond by visiting:
http://pgfoundry.org/tracker/?func=detail&atid=538&aid=1010745&group_id=1000125
--
Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-odbc
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: psqlodbc-bugs@pgfoundry.org, noreply@pgfoundry.org
Subject: Re: [psqlodbc-Bugs][1010745] ODBC Interval data types are not implemented natively
In-Reply-To: <20150122072124.C9BEBDBABB4@pgfoundry.org>
References: <20150122072124.C9BEBDBABB4@pgfoundry.org>
* 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