Thread: BUG #6534: Passing numeric Bind variables to ODBC driver convers to "Double precision"
BUG #6534: Passing numeric Bind variables to ODBC driver convers to "Double precision"
From
barry_bell@harte-hanks.com
Date:
The following bug has been logged on the website: Bug reference: 6534 Logged by: Barry Bell Email address: barry_bell@harte-hanks.com PostgreSQL version: 9.1.2 Operating system: Windows Server 2003=20 Description:=20=20=20=20=20=20=20=20 Using the lastest of ODBC ANSI driver for windows 32bit ver 9.00.03 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" format instead of integer. Is there a setting on the ODBC driver for incoming vairables? If not it is a buf.
Re: BUG #6534: Passing numeric Bind variables to ODBC driver convers to "Double precision"
From
Robert Haas
Date:
On Thu, Mar 15, 2012 at 3:04 PM, <barry_bell@harte-hanks.com> 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: 9.1.2 > Operating system: =A0 Windows Server 2003 > Description: > > Using the lastest of ODBC ANSI driver for > windows 32bit ver 9.00.03 > 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" 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. --=20 Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
Re: BUG #6534: Passing numeric Bind variables to ODBC driver convers to "Double precision"
From
Amit Kapila
Date:
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=92s 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, <barry_bell@harte-hanks.com> 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: 9.1.2 > Operating system: =A0 Windows Server 2003 > Description: > > Using the lastest of ODBC ANSI driver for > windows 32bit ver 9.00.03 > 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" 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. --=20 Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company --=20 Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
Re: BUG #6534: Passing numeric Bind variables to ODBC driver convers to "Double precision"
From
Barry Bell
Date:
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 Precisio= n" input bind variable. Sending Nvar=3D"1" will work but there are issues with converting numbers to charac= ter, 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 drive= r 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 variab= le, 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 drive= r convers to "Double precision" On Thu, Mar 15, 2012 at 3:04 PM, <barry_bell@harte-hanks.com> 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 change= s to your subscription: http://www.postgresql.org/mailpref/pgsql-bugs
Re: BUG #6534: Passing numeric Bind variables to ODBC driver convers to "Double precision"
From
Amit Kapila
Date:
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 Precisio= n" 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, <barry_bell@harte-hanks.com> 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
Re: BUG #6534: Passing numeric Bind variables to ODBC driver convers to "Double precision"
From
Barry Bell
Date:
Yes, this is happening when variables are passed to a function The call below does work: Nvar Select * from mytable where id=3D?nvar=20 Select function call below will work if they function is defined as "Double= precision"=20 (that and the error I am getting from Postgres says it is be passed "Double= precision") We will get the "unknown function "Double precision" parameter" error when We are calling a function with numeric or integer parameters. Is there an ODBC setting for incoming numeric bind variables? 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: Wednesday, April 11, 2012 6:15 AM To: Barry Bell Cc: pgsql-bugs@postgresql.org Subject: RE: [BUGS] BUG #6534: Passing numeric Bind variables to ODBC drive= r convers to "Double precision" Does it happen only for function call or otherwise for Insert statement als= o? 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] 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 drive= r 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 Precisio= n" input bind variable. Sending Nvar=3D"1" will work but there are issues with converting numbers to charac= ter, Any Ideas? Thanks Barry Bell, IT Department 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, <barry_bell@harte-hanks.com> 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
Re: BUG #6534: Passing numeric Bind variables to ODBC driver convers to "Double precision"
From
Amit Kapila
Date:
>> Is there an ODBC setting for incoming numeric bind variables? I don't think there is any such kind of setting, atleast I am not aware. I am guessing mostly it=92s the Postgres behavior or some problem in the way the application is using ODBC. >> Select function call below will work if they function is defined as "Double precision"=20 >>(that and the error I am getting from Postgres says it is be passed "Double precision") >>We will get the "unknown function "Double precision" parameter" error when >>We are calling a function with numeric or integer parameters. Can you provide this with an example like how you have defined your function and how it is getting called from ODBC. -----Original Message----- From: Barry Bell [mailto:Barry_Bell@harte-hanks.com]=20 Sent: Wednesday, April 11, 2012 6:24 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" Yes, this is happening when variables are passed to a function The call below does work: Nvar Select * from mytable where id=3D?nvar=20 Select function call below will work if they function is defined as "Double precision"=20 (that and the error I am getting from Postgres says it is be passed "Double precision") We will get the "unknown function "Double precision" parameter" error when We are calling a function with numeric or integer parameters. Is there an ODBC setting for incoming numeric bind variables? 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: Wednesday, April 11, 2012 6:15 AM To: Barry Bell Cc: pgsql-bugs@postgresql.org Subject: RE: [BUGS] BUG #6534: Passing numeric Bind variables to ODBC driver convers to "Double precision" 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] 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 Precisio= n" 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 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, <barry_bell@harte-hanks.com> 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