X-Original-To: pgsql-odbc-postgresql.org@localhost.postgresql.org Received: from localhost (neptune.hub.org [200.46.204.2]) by svr1.postgresql.org (Postfix) with ESMTP id 909F9D1B432 for ; Thu, 11 Dec 2003 13:30:14 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (neptune.hub.org [200.46.204.2]) (amavisd-new, port 10024) with ESMTP id 33074-08 for ; Thu, 11 Dec 2003 09:29:46 -0400 (AST) Received: from mail.acsys.it (mail.acsys.it [81.208.27.4]) by svr1.postgresql.org (Postfix) with ESMTP id 08545D1B430 for ; Thu, 11 Dec 2003 09:29:42 -0400 (AST) Received: from PCZito (fw.acsys.it [81.208.27.126]) by mail.acsys.it (Postfix) with SMTP id C112133E7FA for ; Thu, 11 Dec 2003 14:29:39 +0100 (CET) Message-ID: <000a01c3bfeb$1e732bf0$660100c0@PCZito> From: "Giovanni Zito" To: Subject: Unexpected result for SQLGetTypeInfo for SQL_TYPE_TIMESTAMP Date: Thu, 11 Dec 2003 14:31:44 +0100 Organization: Advanced Computer Systems s.p.a. MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0007_01C3BFF3.802851B0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1158 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=1.3 tagged_above=0.0 required=5.0 tests=HTML_50_60, HTML_FONT_COLOR_GREEN, UPPERCASE_25_50 X-Spam-Level: * X-Archive-Number: 200312/35 X-Sequence-Number: 3573 This is a multi-part message in MIME format. ------=_NextPart_000_0007_01C3BFF3.802851B0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable I'm using psqlodbc-07.03.02.00, (odbc driver 3.0) to access psql server fro= m 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 (=20 field1 timestamp (6) without time zone=20 )=20 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 =3D SQLSetEnvAttr( henv, SQL_ATTR_ODBC_VERSION, (SQLPOINTER)SQL_OV_= ODBC3, 0 ); Then I called SQLGetTypeInfo(SQL_TYPE_TIMESTAMP), so I was expected to foun= d=20 0 for MINIMUM_SCALE=20 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 =3D 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.- ------=_NextPart_000_0007_01C3BFF3.802851B0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
I'm using psqlodbc-07.03.02.00, (odbc driv= er 3.0)=20 to access psql server from Windows (Postgres=20 Server version is 7.2)
 
Before to start I tryed a simple test.
 
In my database I created a simple table with just a tim= estamp=20 field:
 
CREATE TABLE table1 (
  field1 timestamp (6) without time zon= e=20
)
 
You can see that the field1 has a decimal precision of= =20 6.
 
 
 
 
My test odbc application declared SQL_ATTR_ODBC_VERSION as=20 SQL_OV_ODBC3
retcode =3D SQLSetEnvAttr( henv,=20 SQL_ATTR_ODBC_VERSION, (SQLPOINTER)SQL_OV_ODBC3, 0 );

 

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

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

<= BR>Again it=20 returns:

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