Skip site navigation (1) Skip section navigation (2)

Re: time problem with postgres ODBC driver (fwd)

From: Laurette Cisneros <laurette(at)nextbus(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: <pgsql-odbc(at)postgresql(dot)org>
Subject: Re: time problem with postgres ODBC driver (fwd)
Date: 2002-02-12 18:49:51
Message-ID: Pine.LNX.4.33.0202121049330.25861-100000@visor.corp.nextbus.com (view raw or flat)
Thread:
Lists: pgsql-odbc
The version of the old ODBC driver is: 1.0.0.0

L.
On Tue, 12 Feb 2002, Tom Lane wrote:

> Laurette Cisneros <laurette(at)nextbus(dot)com> writes:
> > On Tue, 12 Feb 2002, Tom Lane wrote:
> >> It sounds like ODBC (or the client application) is misinterpreting the
> >> datatype of col2 as being a "date" or "date/time" type not "time of
> >> day".  There is a translation between PG internal types and the ODBC
> >> standard's notion of types, so one possible explanation is that there's
> >> something getting lost in translation.
>
> > What's even more interesting is that casting doesn't help -
> > col2::time still returns the current date.
>
> No, of course it wouldn't --- the column coming out of the backend is
> PG's "time" type either way.  I'm sure that the unwanted conversion to
> a date or datetime value (with, evidently, implicit fill-in of today's
> date) is happening on the client side.
>
> I don't know if our ODBC code should be blamed or if it's a
> client-application bug.  A quick look at the ODBC sources makes it
> appear that the ODBC code reports ODBC type code "SQL_TIME" for a
> PG "time" column, which seems a reasonable mapping to me, but I'm
> no ODBC expert.
>
> > Us too.  The only difference is that that ODBC driver was an older version
> > than the new one that was downloaded and started this problem
>
> Hmm, so perhaps the problem could have been triggered by a recent "fix".
> I looked at 7.1 and 7.2 ODBC sources and they seemed about the same in
> this respect.  Do you know what version the GB driver was, exactly?
>
> 			regards, tom lane
>

-- 
Laurette Cisneros
(510) 420-3137
NextBus Information Systems, Inc.
www.nextbus.com
Passenger Information Everywhere


In response to

Responses

pgsql-odbc by date

Next:From: Tom LaneDate: 2002-02-12 19:00:07
Subject: Re: time problem with postgres ODBC driver (fwd)
Previous:From: Tom LaneDate: 2002-02-12 18:37:35
Subject: Re: time problem with postgres ODBC driver (fwd)

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group