From: | Andrei Kovalevski <andyk(at)commandprompt(dot)com> |
---|---|
To: | Richard Broersma Jr <rabroersma(at)yahoo(dot)com> |
Cc: | Postgresql ODBC List <pgsql-odbc(at)postgresql(dot)org> |
Subject: | Re: possible ODBC bug with '-infinity' |
Date: | 2008-01-03 16:33:35 |
Message-ID: | 477D0E5F.9040705@commandprompt.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-odbc |
Hello, Happy New Year!
Richard Broersma Jr wrote:
> --- On Mon, 12/3/07, Andrei Kovalevski <andyk(at)commandprompt(dot)com> wrote:
>
>
>> Are you sure these values are equal? Try this in PgAdmin:
>>
>> create table t (t timestamp);
>> insert into t values ('-infinity');
>> insert into t values ('infinity');
>> insert into t values ('9999-12-31 23:59:59');
>> insert into t values ('5874897-12-31 23:59:59');
>> insert into t values ('5874897-12-31
>> 23:59:59.999999999');
>> --insert into t values ('5874898-01-01 00:00:00');
>> select t::date, t::time, t::timestamp, t::varchar from t;
>>
>
> Now the real question is, "What does and ODBC client do with these value?".
>
> Also, don't forget to include values for -infinity and other timestamps that are smaller than what the client side application can display.
>
ODBC supports dates and timestamps as:
typedef struct tagTIMESTAMP_STRUCT
{
SQLSMALLINT year;
..........
} TIMESTAMP_STRUCT;
So, it can't show dates bigger then 32,767 or smaller then -32,768.
I think - correct driver behavour should be:
1) driver returns NULL value for SQL_DATE_STRUCT and SQL_TIMESTAMP_STRUCT
2) function return value should be SQL_SUCCESS_WITH_INFO;
3) driver also sets Informative Description for this error with actual
value - if possible.
--
Andrei Kovalevski
PostgreSQL Replication, Consulting, Custom Development, 24x7 support
Managed Services, Shared and Dedicated Hosting
Co-Authors: plPHP, ODBCng - http://www.commandprompt.com/
From | Date | Subject | |
---|---|---|---|
Next Message | Andrei Kovalevski | 2008-01-03 17:34:58 | Re: Linux Unicode character size |
Previous Message | FabijanicA | 2008-01-03 14:56:43 | Linux Unicode character size |