pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Amit Kapila <amit.kapila@huawei.com>
To: Barry Bell <Barry_Bell@harte-hanks.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #6534: Passing numeric Bind variables to ODBC driver convers to "Double precision"
Date: Wed, 11 Apr 2012 15:44:40 +0530
Message-ID: <000e01cd17cb$e909dcb0$bb1d9610$%kapila@huawei.com> (raw)
In-Reply-To: <542B943ED5D72E408BF9CBBD61ABC94D52D10D6E@VA3DIAXVSC31.RED001.local>
References: <E1S8Fys-0003bI-Rz@wrigleys.postgresql.org>
	<CA+Tgmoa9xDLmP-YSoEvDV8+7wuSncbs4Fm6_yoSoj1zFgCRD+w@mail.gmail.com>
	<002701cd16b3$b0d860a0$128921e0$%kapila@huawei.com>
	<542B943ED5D72E408BF9CBBD61ABC94D52D10D6E@VA3DIAXVSC31.RED001.local>

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=1, nvar=1.0000 or nvar=1.00 will come across as "Double Precision"
input bind variable.
Sending
Nvar="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] 
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:      6534
> Logged by:          Barry Bell
> Email address:      barry_bell@harte-hanks.com PostgreSQL version: 
> 9.1.2 Operating system:   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=1
> 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.

--
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






view thread (7+ messages)  latest in thread

Message-ID: <000e01cd17cb$e909dcb0$bb1d9610$%kapila@huawei.com>
Permalink:  ../000e01cd17cb$e909dcb0$bb1d9610$%25kapila@huawei.com/
Also on:    postgresql.org/message-id/000e01cd17cb$e909dcb0$bb1d9610$%kapila@huawei.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-bugs@postgresql.org
  Cc: amit.kapila@huawei.com, Barry_Bell@harte-hanks.com
  Subject: Re: BUG #6534: Passing numeric Bind variables to ODBC driver convers to "Double precision"
  In-Reply-To: <000e01cd17cb$e909dcb0$bb1d9610$%kapila@huawei.com>
  References: <E1S8Fys-0003bI-Rz@wrigleys.postgresql.org> <CA+Tgmoa9xDLmP-YSoEvDV8+7wuSncbs4Fm6_yoSoj1zFgCRD+w@mail.gmail.com> <002701cd16b3$b0d860a0$128921e0$%kapila@huawei.com> <542B943ED5D72E408BF9CBBD61ABC94D52D10D6E@VA3DIAXVSC31.RED001.local> <000e01cd17cb$e909dcb0$bb1d9610$%kapila@huawei.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox