Received: from localhost (unknown [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 86B562E0047 for ; Mon, 3 Dec 2007 10:49:41 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-maia, port 10024) with ESMTP id 41167-01 for ; Mon, 3 Dec 2007 10:49:26 -0400 (AST) Received: from lists.commandprompt.com (host-159.commandprompt.net [207.173.203.159]) by postgresql.org (Postfix) with ESMTP id 4EBF32E003F for ; Mon, 3 Dec 2007 10:49:36 -0400 (AST) Received: from [77.109.29.168] ([77.109.29.168]) (authenticated bits=0) by lists.commandprompt.com (8.13.8/8.13.8) with ESMTP id lB3EnRAp022008 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Mon, 3 Dec 2007 06:49:33 -0800 Message-ID: <47541770.4070206@commandprompt.com> Date: Mon, 03 Dec 2007 16:49:20 +0200 From: Andrei Kovalevski User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 To: Postgresql ODBC List Subject: Re: possible ODBC bug with '-infinity' References: <160989.65498.qm@web31805.mail.mud.yahoo.com> In-Reply-To: <160989.65498.qm@web31805.mail.mud.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0 (lists.commandprompt.com [207.173.203.159]); Mon, 03 Dec 2007 06:49:35 -0800 (PST) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200712/7 X-Sequence-Number: 9285 Richard Broersma Jr wrote: > --- On Mon, 12/3/07, Andrei Kovalevski wrote: > > >> 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'. >> > > Actually, postgresql doesn't actually have a (+/-) infinity value. Notice: > http://www.postgresql.org/docs/8.3/static/datatype-datetime.html#AEN4999 > > +infinity = 5874897 AD > -infinity = 4713 BC > 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; Cool behaviour: PostgreSQL 8.2.x thinks that 'infinity' = '-infinity' = null if it was converted from timestamp to date or time.... By the way - you can't 'insert into t values ('5874898-01-01 00:00:00')', but you can 'insert into t values ('5874897-12-31 23:59:59.999999999')' - with interesting result ;) > so the problem must be that ADO doesn't know what to do with dates as small as 4713 BCE. > > ---------------------------(end of broadcast)--------------------------- > TIP 2: Don't 'kill -9' the postmaster >