Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id AFA21475B85 for ; Thu, 21 Nov 2002 09:19:07 -0500 (EST) Received: from sd.tpf.co.jp (sd.tpf.co.jp [210.161.239.34]) by postgresql.org (Postfix) with SMTP id 1CBC8475AE5 for ; Thu, 21 Nov 2002 09:19:05 -0500 (EST) Received: (qmail 17679 invoked from network); 21 Nov 2002 14:19:04 -0000 X-Authentication: inoue was authenticated by sd.tpf.co.jp at 21 Nov 2002 14:19:04 -0000 Received: from unknown (HELO mcadnote1) (219.61.40.34) by sd.tpf.co.jp with SMTP; 21 Nov 2002 14:19:04 -0000 From: "Hiroshi Inoue" To: "Han" Cc: Subject: Re: Problems about ODBC3 datetime Date: Thu, 21 Nov 2002 23:20:33 +0900 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="GB2312" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) In-Reply-To: <20021121065238.3CE824758FE@postgresql.org> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Importance: Normal X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200211/111 X-Sequence-Number: 2288 > -----Original Message----- > From: Han > > Hi, > Firstly, I encountered a problem when using SQL_DATE: when > I use SQLGetTypeInfo(...,SQL_DATE); > the API returns no record. I debuged the psqlodbc driver and > found that the value of the parameter DataType was 91. So I think > that the value was changed by the odbc30 Driver Manager. But why > don't the psqlodbc add the SQL_TYPE_DATE and other ODBC30 data > types support in the array sqlTypes[](in pgtypes.c)? Hmm you seem to be right. I would add SQL_TYPE_DATE, SQL_TYPE_TIME and SQL_TYPE_TIMESTAMP to sqlTypes[]. > Secondly, I wander why returning SQL_DATETIME in function > pgtype_to_sqldesctype for the three types--SQL_TYPE_DATE, > SQL_TYPE_TIME, SQL_TYPE_TIMESTAMP? There are SQL_DESC_TYPE and SQL_DESC_CONCISE_TYPE in ODBC3 and If SQL_DESC_CONCISE_TYPE is set to a concise data type other than an interval or datetime data type, the SQL_DESC_TYPE field is set to the same value and the SQL_DESC_DATETIME_INTERVAL_CODE field is set to 0. If SQL_DESC_CONCISE_TYPE is set to the concise datetime or interval data type, the SQL_DESC_TYPE field is set to the corresponding verbose type (SQL_DATETIME or SQL_INTERVAL) and the SQL_DESC_DATETIME_INTER VAL_CODE field is set to the appropriate subcode. regards, Hiroshi Inoue