Re: 'infinity'::timestamp not translated correctly - Mailing list pgsql-odbc

From Hiroshi Inoue
Subject Re: 'infinity'::timestamp not translated correctly
Date
Msg-id 3CA80FD6.1984A7DA@tpf.co.jp
Whole thread Raw
In response to Re: 'infinity'::timestamp not translated correctly using ODBCv7.01.00.10 ?  ("Hiroshi Inoue" <Inoue@tpf.co.jp>)
Responses Re: 'infinity'::timestamp not translated correctly  (Kristis Makris <kristis.makris@datasoft.com>)
List pgsql-odbc
Kristis Makris wrote:
>
> On Fri, 2002-03-29 at 09:29, Hiroshi Inoue wrote:
> > >
> > > 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?
> >
> > There's no concept of inifinity in the timestamp type of ODBC(and in
> > many DBMSs).
>
> Since postgres does allow it as a valid value of the date datatype,
> shouldn't all postgres interfaces (jdbc/odbc, etc.) support it? If this
> concept shouldn't be supported, then why is it by the backend?

I don't think it's a good idea to rely on PostgreSQL's
*infinity* timestamp. As I already mentioned there's no
concept in ODBC's SQL_C_(TYPE_)TIMESTAMP type. However
psqlodbc driver seems to be able to return *infinity* as
SQL_C_CHAR and I've just changed the driver. Please try
the latest driver at http://w2422.nsk.ne.jp/~inoue/.

regards,
Hiroshi Inoue

pgsql-odbc by date:

Previous
From: John Herreshoff
Date:
Subject: Re: WIN Connection -> ODBC -> Linux Slackware
Next
From: "Krishna Gandhi"
Date:
Subject: The size of the field is too long