Skip site navigation (1) Skip section navigation (2)

Re: possible ODBC bug with '-infinity'

From: Andrei Kovalevski <andyk(at)commandprompt(dot)com>
Cc: Postgresql ODBC List <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: possible ODBC bug with '-infinity'
Date: 2007-12-03 13:46:30
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-odbc

Richard Broersma Jr wrote:
> --- On Sun, 12/2/07, Hiroshi Inoue <inoue(at)tpf(dot)co(dot)jp> wrote:
>> Do you think it is an appropriate handling ?
> This is a good question.  I am not sure what an appropriate handling would be.  My first test of '-infinity' (which resulted in a raised error) was with an ado recordset.  Since you are questioning what is appropriate I thought that I should try a few different client front ends to see how they treated (+/-)infinity:
> Client   |   -infinity       | + infinity
> ADO      | <error>           |9999-12-31 23:59:59|
> Access/LT|1899-11-30 00:00:00|9999-12-31 23:59:59|
> OOB(ODBC)|0001-01-03 00:00:00|9999-12-31 23:59:59|
> ADO = ado recordset created in VB
> Access/LT = a linked tabled in MS-Access (probably DAO/ODBC?)
> OOB(ODBC) = Open Base ODBC connection to the Database.
> Having done further tests, it seems that the error must be a bug with ADO since other clients have not a problem with making -infinity equal to the smallest time stamp that their respective data type can display.  In my case, I do not really care about what time stamp values are displayed by the clients for (+/-) infinity since I use these values as an implied NULL value for time stamps.  Unfortunately, ADO is broken and can't display any value for -infinity.
>> How do you think the driver should treat -infinity ?
> It seems that it already handles it correctly. I was mistaken in thinking that the translation of (+/-) infinity was handled by ODBC. :o)
It should be handled by ODBC because of possible type conversions on the 
ODBC driver layer. Take a look: Table shows 
required conversions. Also all Microsoft applications notify ODBC driver 
by setting additional parameter during initialization. I think ADO 
requests 'inifinity' value as SQL_C_CHAR and sure it doesn't expect it 
to be 'infinity'.

> Regards,
> Richard Broersma Jr.
> ---------------------------(end of broadcast)---------------------------
> TIP 6: explain analyze is your friend

In response to


pgsql-odbc by date

Next:From: Richard Broersma JrDate: 2007-12-03 13:56:18
Subject: Re: possible ODBC bug with '-infinity'
Previous:From: Richard Broersma JrDate: 2007-12-03 13:25:40
Subject: Re: possible ODBC bug with '-infinity'

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group