pg.ddx.io  pgsql-odbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Hiroshi Inoue <Inoue@tpf.co.jp>
To: Han <zhouhanok@vip.sina.com>
Cc: pgsql-odbc@postgresql.org
Subject: Re: Problems about ODBC3 datetime
Date: Thu, 21 Nov 2002 23:20:33 +0900
Message-ID: <EKEJJICOHDIEMGPNIFIJAEMPJMAA.Inoue@tpf.co.jp> (raw)
In-Reply-To: <20021121065238.3CE824758FE@postgresql.org>

> -----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




view thread (2+ messages)

Message-ID: <EKEJJICOHDIEMGPNIFIJAEMPJMAA.Inoue@tpf.co.jp>
Permalink:  ../EKEJJICOHDIEMGPNIFIJAEMPJMAA.Inoue@tpf.co.jp/
Also on:    postgresql.org/message-id/EKEJJICOHDIEMGPNIFIJAEMPJMAA.Inoue@tpf.co.jp

 · 

reply

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: Inoue@tpf.co.jp, zhouhanok@vip.sina.com
  Subject: Re: Problems about ODBC3 datetime
  In-Reply-To: <EKEJJICOHDIEMGPNIFIJAEMPJMAA.Inoue@tpf.co.jp>
  References: <20021121065238.3CE824758FE@postgresql.org> <EKEJJICOHDIEMGPNIFIJAEMPJMAA.Inoue@tpf.co.jp>

* 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