Binding time and timestamp with time zone data type - Mailing list pgsql-odbc

From Mateusz Loskot
Subject Binding time and timestamp with time zone data type
Date
Msg-id CABUeae8fYodDk0jt0NZ1tHChbmWPGj+DRYy2805X7dvppWNs7g@mail.gmail.com
Whole thread Raw
List pgsql-odbc
Hi,

I'm using psqlODBC  9.05.03.00.

I have two questions regarding use of time and timestamp data types.

I noticed a quirk in mapping the PostgreSQL time data types to ODBC data types,
that is how they are reported by SQLDescribeCol:

1. 'time without time zone' and 'timestamp without time zone'
as SQL_TIME and SQL_TIMESTAMP respectively

2. 'timestamp with time zone' is reported as SQL_TIMESTAMP

3. 'time with time zone' is reported as SQL_[W]VARCHAR, not as SQL_TIME.

As far as my ODBC knowledge goes, the first two mappings are expected,
whereas the third seems odd.

Could anyone explain to me why is the 'time with time zone' is mapped like that?

Second, what is the correct way to bind and fetch data from column
of 'time with time zone' or 'timestamp with time zone' data types
in order to get the time zone component?

Best regards,
--
Mateusz Loskot, http://mateusz.loskot.net


pgsql-odbc by date:

Previous
From: Alvaro Herrera
Date:
Subject: [pongsiri@ttei.toshiba.co.th: Test Connection to PostgreSQL by PostgreSQL ODBC Driver]
Next
From: Germán Valdez
Date:
Subject: Re: error conection Provider=MSDASQL