Re: 'infinity'::timestamp not translated correctly

From: Hiroshi Inoue <Inoue(at)tpf(dot)co(dot)jp>
To: Kristis Makris <kristis(dot)makris(at)datasoft(dot)com>
Cc: pgsql-odbc(at)postgresql(dot)org
Subject: Re: 'infinity'::timestamp not translated correctly
Date: 2002-04-01 07:44:22
Message-ID: 3CA80FD6.1984A7DA@tpf.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message Krishna Gandhi 2002-04-02 06:01:52 The size of the field is too long
Previous Message John Herreshoff 2002-03-31 14:32:34 Re: WIN Connection -> ODBC -> Linux Slackware