'infinity'::timestamp not translated correctly using ODBC v7.01.00.10 ? - Mailing list pgsql-odbc

From Kristis Makris
Subject 'infinity'::timestamp not translated correctly using ODBC v7.01.00.10 ?
Date
Msg-id 1017359263.1070.10.camel@leonidas
Whole thread Raw
In response to Re: Difference between ODBCdirect Connection and Pass-through-query  (Cedar Cox <cedarc@visionforisrael.com>)
Responses Re: 'infinity'::timestamp not translated correctly using ODBCv7.01.00.10 ?  ("Hiroshi Inoue" <Inoue@tpf.co.jp>)
List pgsql-odbc
Hello,

I'm issuing the following SQL statement through psql:

mydb=# select 'infinity'::timestamp as reply;
  reply
----------
 infinity
(1 row)


When I try to issue the same statement through VC++ in the following
piece of code I get back "2002-03-28 00:00:00". Is infinity somehow
effectively translated into now()::date || "00:00:00" by the driver?

if (db.CanTransact())
    db.BeginTrans();

CRecordset rsNewRecords(&db);

strStmt = "SELECT 'infinity'::timestamp as reply";
rsNewRecords.Open(CRecordset::forwardOnly, strStmt);

while (!rsNewRecords.IsEOF())
    {
        rsNewRecords.GetFieldValue("reply", retval);
        rsNewRecords.MoveNext();
    }


I'm actually calling a backend function that attempts to make a date
estimate, and happens to return "infinity" in some cases, but so far
I've determined that 'infinity' is never reported as "infinity".

Thanks,
-Kristis


pgsql-odbc by date:

Previous
From: DI Hasenöhrl
Date:
Subject: Re: Difference between ODBCdirect Connection and Pass-through-query
Next
From: DI Hasenöhrl
Date:
Subject: ODBCdirect and MsAccess97