[ psqlodbc-Bugs-1010745 ] ODBC Interval data types are not implemented natively
am 30.12.2009 18:30:16 von noreplyBugs item #1010745, was opened at 2009-12-30 12:27
You can respond by visiting:
http://pgfoundry.org/tracker/?func=detail&atid=538&aid=10107 45&group_id=1000125
Category: None
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Farid Zidan (faridz)
Assigned to: Nobody (None)
Summary: ODBC Interval data types are not implemented natively
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
------------------------------------------------------------ ----------
You can respond by visiting:
http://pgfoundry.org/tracker/?func=detail&atid=538&aid=10107 45&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