Re: Bug #725: ODBC driver problem with internal type PG_TYPE_TIMESTAMP_NO_TMZONE

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: martin(at)schenk(dot)com, pgsql-bugs(at)postgresql(dot)org
Subject: Re: Bug #725: ODBC driver problem with internal type PG_TYPE_TIMESTAMP_NO_TMZONE
Date: 2002-08-14 02:56:34
Message-ID: 200208140256.g7E2uYa23765@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs


This has been corrected in the current sources at odbc.postgresql.org.

---------------------------------------------------------------------------

pgsql-bugs(at)postgresql(dot)org wrote:
> Martin Schenk (martin(at)schenk(dot)com) reports a bug with a severity of 2
> The lower the number the more severe it is.
>
> Short Description
> ODBC driver problem with internal type PG_TYPE_TIMESTAMP_NO_TMZONE
>
> Long Description
> When binding a column with the internal type PG_TYPE_TIMESTAMP_NO_TMZONE to a SQL_C_TIMESTAMP variable, you always get the current date/time as result.
>
> Adding a line to recognize this format to the function "copy_and_convert_field" in odbc/convert.c solves this problem.
>
>
>
> Sample Code
> the problem is solved by adding the following:
>
> case PG_TYPE_ABSTIME:
> case PG_TYPE_DATETIME:
> case PG_TYPE_TIMESTAMP:
> + case PG_TYPE_TIMESTAMP_NO_TMZONE
>
> in file convert.c (line 428), function "copy_and_convert_field"
> (odbc driver shipped with postgres-7.2.1)
>
> No file was uploaded with this report
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 3: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo(at)postgresql(dot)org so that your
> message can get through to the mailing list cleanly
>

--
Bruce Momjian | http://candle.pha.pa.us
pgman(at)candle(dot)pha(dot)pa(dot)us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073

In response to

Browse pgsql-bugs by date

  From Date Subject
Next Message Bruce Momjian 2002-08-14 04:56:34 Re: Bug #728: Interactions between bytea and character encoding
Previous Message Tom Lane 2002-08-13 23:16:31 Re: Bug #738: "order by" returning different results in 7.2 and 7.21