Binding time and timestamp with time zone data type

Поиск
Список
Период
Сортировка
От Mateusz Loskot
Тема Binding time and timestamp with time zone data type
Дата
Msg-id CABUeae8fYodDk0jt0NZ1tHChbmWPGj+DRYy2805X7dvppWNs7g@mail.gmail.com
обсуждение исходный текст
Список 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 по дате отправления:

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: [pongsiri@ttei.toshiba.co.th: Test Connection to PostgreSQL by PostgreSQL ODBC Driver]
Следующее
От: Germán Valdez
Дата:
Сообщение: Re: error conection Provider=MSDASQL