Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id D52BEF7658 for ; Wed, 11 Apr 2012 07:16:50 -0300 (ADT) Received: from szxga01-in.huawei.com ([58.251.152.64]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1SHubR-0003MJ-Vy for pgsql-bugs@postgresql.org; Wed, 11 Apr 2012 10:16:49 +0000 Received: from huawei.com (szxga05-in [172.24.2.49]) by szxga05-in.huawei.com (iPlanet Messaging Server 5.2 HotFix 2.14 (built Aug 8 2006)) with ESMTP id <0M2B00LDR8J7KM@szxga05-in.huawei.com> for pgsql-bugs@postgresql.org; Wed, 11 Apr 2012 18:16:19 +0800 (CST) Received: from szxrg02-dlp.huawei.com ([172.24.2.119]) by szxga05-in.huawei.com (iPlanet Messaging Server 5.2 HotFix 2.14 (built Aug 8 2006)) with ESMTP id <0M2B002MG8J61K@szxga05-in.huawei.com> for pgsql-bugs@postgresql.org; Wed, 11 Apr 2012 18:16:19 +0800 (CST) Received: from szxeml214-edg.china.huawei.com ([172.24.2.119]) by szxrg02-dlp.huawei.com (MOS 4.1.9-GA) with ESMTP id AIH39271; Wed, 11 Apr 2012 18:15:59 +0800 Received: from SZXEML415-HUB.china.huawei.com (10.82.67.154) by szxeml214-edg.china.huawei.com (172.24.2.29) with Microsoft SMTP Server (TLS) id 14.1.323.3; Wed, 11 Apr 2012 18:14:26 +0800 Received: from blrprnc09ns (10.18.96.98) by szxeml415-hub.china.huawei.com (10.82.67.154) with Microsoft SMTP Server id 14.1.323.3; Wed, 11 Apr 2012 18:14:42 +0800 Date: Wed, 11 Apr 2012 15:44:40 +0530 From: Amit Kapila Subject: Re: BUG #6534: Passing numeric Bind variables to ODBC driver convers to "Double precision" In-reply-to: <542B943ED5D72E408BF9CBBD61ABC94D52D10D6E@VA3DIAXVSC31.RED001.local> X-Originating-IP: [10.18.96.98] To: 'Barry Bell' Cc: pgsql-bugs@postgresql.org Message-id: <000e01cd17cb$e909dcb0$bb1d9610$%kapila@huawei.com> MIME-version: 1.0 X-Mailer: Microsoft Office Outlook 12.0 Content-type: text/plain; charset=iso-8859-1 Content-language: en-us Content-transfer-encoding: quoted-printable Thread-index: Ac0WWTa/1H2E0iKMRVy0TDZZ3xyx4gAWifGAABh4NvAALZufYA== X-CFilter-Loop: Reflected References: <002701cd16b3$b0d860a0$128921e0$%kapila@huawei.com> <542B943ED5D72E408BF9CBBD61ABC94D52D10D6E@VA3DIAXVSC31.RED001.local> X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201204/62 X-Sequence-Number: 32813 Does it happen only for function call or otherwise for Insert statement also? What is your function declaration. How have you verified that in postgres it is double precision. -----Original Message----- From: Barry Bell [mailto:Barry_Bell@harte-hanks.com]=20 Sent: Tuesday, April 10, 2012 6:00 PM To: Amit Kapila Cc: pgsql-bugs@postgresql.org Subject: RE: [BUGS] BUG #6534: Passing numeric Bind variables to ODBC = driver convers to "Double precision" No matter what numeric type I try to pass,(integer, numeric, currency) = the ODBC driver is turning it into "Double Precision" Only If I send the value as a string Declare nvar as numeric(10,2) Nvar=3D1, nvar=3D1.0000 or nvar=3D1.00 will come across as "Double = Precision" input bind variable. Sending Nvar=3D"1" will work but there are issues with converting numbers to character, Any Ideas? Thanks Barry Bell, IT Department=20 Office: 954-429-3771 x267 Fax: 954-281-1464 email = Barry_Bell@harte-hanks.com -----Original Message----- From: Amit Kapila [mailto:amit.kapila@huawei.com]=20 Sent: Monday, April 09, 2012 8:49 PM To: Barry Bell Cc: pgsql-bugs@postgresql.org Subject: RE: [BUGS] BUG #6534: Passing numeric Bind variables to ODBC = driver convers to "Double precision" In ODBC while binding variable using SQLBindParameter(..) API you might = be using SQL_DOUBLE or SQL_Numeric or some similar datatype to send the variable, that's why in postgres it is showing as "Double precision" -----Original Message----- From: pgsql-bugs-owner@postgresql.org [mailto:pgsql-bugs-owner@postgresql.org] On Behalf Of Robert Haas Sent: Monday, April 09, 2012 7:31 PM To: barry_bell@harte-hanks.com Cc: pgsql-bugs@postgresql.org Subject: Re: [BUGS] BUG #6534: Passing numeric Bind variables to ODBC = driver convers to "Double precision" On Thu, Mar 15, 2012 at 3:04 PM, wrote: > The following bug has been logged on the website: > > Bug reference: =A0 =A0 =A06534 > Logged by: =A0 =A0 =A0 =A0 =A0Barry Bell > Email address: =A0 =A0 =A0barry_bell@harte-hanks.com PostgreSQL = version:=20 > 9.1.2 Operating system: =A0 Windows Server 2003 > Description: > > Using the lastest of ODBC ANSI driver for windows 32bit ver 9.00.03=20 > Calling from MS VFP 9.0 > > public nvar as interger > nvar=3D1 > running the following sql: > "( select function_pkg(?nvar) " > > The bind variable nvar will show in postgres as "Double Precision"=20 > format instead of integer. > > Is there a setting on the ODBC driver for incoming vairables? > If not it is a buf. Given the lack of any response here, I suggest reposting this to the pgsql-odbc mailing list. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL = Company -- Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make = changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs