'infinity'::timestamp not translated correctly using ODBC v7.01.00.10 ?

From: Kristis Makris <kristis(dot)makris(at)datasoft(dot)com>
To: pgsql-odbc(at)postgresql(dot)org
Subject: 'infinity'::timestamp not translated correctly using ODBC v7.01.00.10 ?
Date: 2002-03-28 23:47:43
Message-ID: 1017359263.1070.10.camel@leonidas
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message DI Hasenöhrl 2002-03-29 10:29:59 ODBCdirect and MsAccess97
Previous Message Steve Stockstill 2002-03-28 18:54:43 bpchar length problems