Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1Ztykn-0000bi-K3 for pgsql-odbc@arkaria.postgresql.org; Wed, 04 Nov 2015 14:09:33 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84) (envelope-from ) id 1Ztykm-00067u-S4 for pgsql-odbc@arkaria.postgresql.org; Wed, 04 Nov 2015 14:09:32 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84) (envelope-from ) id 1Ztykm-00067U-7y for pgsql-odbc@postgresql.org; Wed, 04 Nov 2015 14:09:32 +0000 Received: from mail2.asahi-net.or.jp ([202.224.39.198]) by magus.postgresql.org with esmtp (Exim 4.84) (envelope-from ) id 1Ztyki-0002V0-Lj for pgsql-odbc@postgresql.org; Wed, 04 Nov 2015 14:09:31 +0000 Received: from [192.168.1.8] (aa029251.dynamic.ppp.asahi-net.or.jp [110.5.29.251]) by mail2.asahi-net.or.jp (Postfix) with ESMTP id 4C2ED1AA11; Wed, 4 Nov 2015 23:09:24 +0900 (JST) Subject: Re: [BUGS] There is a case in which psqlodbc-09.03.0400 returns unterminated strings on Windows. To: Naoya Anzai References: <116262CF971C844FB6E793F8809B51C6EF245E@BPXM02GP.gisp.nec.co.jp> <56010956.1060108@iki.fi> <116262CF971C844FB6E793F8809B51C6EF6319@BPXM02GP.gisp.nec.co.jp> <116262CF971C844FB6E793F8809B51C6F149EA@BPXM02GP.gisp.nec.co.jp> Cc: Heikki Linnakangas , "pgsql-odbc@postgresql.org" , Hiroshi Yanagisawa From: "Inoue, Hiroshi" Message-ID: <563A1195.4090001@dream.email.ne.jp> Date: Wed, 4 Nov 2015 23:09:25 +0900 User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 In-Reply-To: <116262CF971C844FB6E793F8809B51C6F149EA@BPXM02GP.gisp.nec.co.jp> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-odbc Precedence: bulk Sender: pgsql-odbc-owner@postgresql.org 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@xc.jp.nec.com -- Sent via pgsql-odbc mailing list (pgsql-odbc@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-odbc