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

Bug #725: ODBC driver problem with internal type PG_TYPE_TIMESTAMP_NO_TMZONE

From: pgsql-bugs(at)postgresql(dot)org
To: pgsql-bugs(at)postgresql(dot)org
Subject: Bug #725: ODBC driver problem with internal type PG_TYPE_TIMESTAMP_NO_TMZONE
Date: 2002-07-31 08:00:54
Message-ID: 20020731080054.BEAA047514F@postgresql.org (view raw or flat)
Thread:
Lists: pgsql-bugs
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


Responses

pgsql-bugs by date

Next:From: pgsql-bugsDate: 2002-07-31 13:27:38
Subject: Bug #726: PHP/PG ERROR: parser: parse error at or near ","
Previous:From: Tatsuo IshiiDate: 2002-07-31 05:18:20
Subject: Re: Multi-byte character bug

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