Unexpected result for SQLGetTypeInfo for SQL_TYPE_TIMESTAMP - Mailing list pgsql-odbc

From Giovanni Zito
Subject Unexpected result for SQLGetTypeInfo for SQL_TYPE_TIMESTAMP
Date
Msg-id 000a01c3bfeb$1e732bf0$660100c0@PCZito
Whole thread Raw
List pgsql-odbc
I'm using psqlodbc-07.03.02.00, (odbc driver 3.0) to access psql server from Windows (Postgres Server version is 7.2)
 
Before to start I tryed a simple test.
 
In my database I created a simple table with just a timestamp field:
 
CREATE TABLE table1 (
  field1 timestamp (6) without time zone
)
 
You can see that the field1 has a decimal precision of 6.
 
 
 
 
My test odbc application declared SQL_ATTR_ODBC_VERSION as SQL_OV_ODBC3
retcode = SQLSetEnvAttr( henv, SQL_ATTR_ODBC_VERSION, (SQLPOINTER)SQL_OV_ODBC3, 0 );

 

Then I called SQLGetTypeInfo(SQL_TYPE_TIMESTAMP), so I was expected to found
 
0 for MINIMUM_SCALE
6 for MAXIMUM_SCALE
 
 
The SQLGetTypeInfo( SQL_TYPE_TIMESTAMP ) function returns:
 
19 for COLUMN_SIZE
0 for both MINIMUM_SCALE and MAXIMUM_SCALE
 
 
 
Then I've tried to call SQLColumns() function on "table1", field "field1".
 

retcode = SQLColumns(hstmt,
  NULL, 0,
/* All catalogs */
  NULL, 0, /* All schemas */
  (SQLCHAR*)"table1", SQL_NTS,
  (SQLCHAR*)"field1", SQL_NTS);



Again it returns:

 
19 for COLUMN_SIZE
0 for DECIMAL_DIGITS
 
I was expecting to found 26 for COLUMN_SIZE and 6 for DECIMAL_DIGITS.
 
 
What's wrong????
 
Please HELP, IT'S URGENT!
 
 
-G.Z.-
 

pgsql-odbc by date:

Previous
From: "Philippe Lang"
Date:
Subject: Re: Sniffer to trace ODBC calls?
Next
From: Richard Combs
Date:
Subject: Re: Sniffer to trace ODBC calls?