From: Giovanni Zito <g.zito@acsys.it>
To: pgsql-odbc@postgresql.org
Subject: Unexpected result for SQLGetTypeInfo for SQL_TYPE_TIMESTAMP
Date: Thu, 11 Dec 2003 14:31:44 +0100
Message-ID: <000a01c3bfeb$1e732bf0$660100c0@PCZito> (raw)
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.-
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: g.zito@acsys.it
Subject: Re: Unexpected result for SQLGetTypeInfo for SQL_TYPE_TIMESTAMP
In-Reply-To: <000a01c3bfeb$1e732bf0$660100c0@PCZito>
References: <000a01c3bfeb$1e732bf0$660100c0@PCZito>
* 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