Re: [BUGS] There is a case in which psqlodbc-09.03.0400 returns unterminated strings on Windows.

From: "Inoue, Hiroshi" <h-inoue(at)dream(dot)email(dot)ne(dot)jp>
To: Naoya Anzai <nao-anzai(at)xc(dot)jp(dot)nec(dot)com>
Cc: Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, "pgsql-odbc(at)postgresql(dot)org" <pgsql-odbc(at)postgresql(dot)org>, Hiroshi Yanagisawa <hir-yanagisawa(at)ut(dot)jp(dot)nec(dot)com>
Subject: Re: [BUGS] There is a case in which psqlodbc-09.03.0400 returns unterminated strings on Windows.
Date: 2015-11-04 14:09:25
Message-ID: 563A1195.4090001@dream.email.ne.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-odbc

Hi,

Oops it was my mistake.
I would take care of it.
BTW why is the last parameter 6?

regards,
Hiroshi Inoue

On 2015/11/04 12:53, Naoya Anzai wrote
> Hi, psqlodbc commiters.
>
>> --- C:/work/psqlodbc-a2def3d/convert.c.orig Wed Sep 23 16:14:10 2015
>> +++ C:/work/psqlodbc-a2def3d/convert.c Thu Sep 24 09:01:50 2015
>> @@ -1247,8 +1247,7 @@
>> case PG_TYPE_TIMESTAMP:
>> /* sprintf(rgbValueBindRow, "%.4d-%.2d-%.2d %.2d:%.2d:%.2d",
>> std_time.y, std_time.m, std_time.d, std_time.hh, std_time.mm, std_time.ss);
>> */
>> - len = stime2timestamp(&std_time, rgbValueBindRow, cbValueMax, FALSE,
>> - (int) (cbValueMax - len - 2) );
>> + len = stime2timestamp(&std_time, rgbValueBindRow, cbValueMax, FALSE, 6 );
>> if (len + 1 > cbValueMax)
>> result = COPY_RESULT_TRUNCATED;
>> break;
>>
>> In PostgreSQL, I think max number of digits of precision is always 6.
> Could someone confirm this?
> I think this is a tiny bug..
>
> Best Regards,
>
> ---
> Naoya Anzai
> Engineering Department
> NEC Solution Inovetors, Ltd.
> E-Mail: nao-anzai(at)xc(dot)jp(dot)nec(dot)com

In response to

Responses

Browse pgsql-odbc by date

  From Date Subject
Next Message Inoue, Hiroshi 2015-11-04 14:26:34 Re: SQL_DATA_AT_EXEC processing broken for large objects in nightly git
Previous Message Heikki Linnakangas 2015-11-04 11:04:01 Re: SQL_DATA_AT_EXEC processing broken for large objects in nightly git