| From: | Dave Cramer <pg(at)fastcrypt(dot)com> |
|---|---|
| To: | Tim Penhey <tim(at)penhey(dot)net> |
| Cc: | "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org> |
| Subject: | Re: Calling functions with numeric parameters |
| Date: | 2004-09-15 12:36:09 |
| Message-ID: | 1095251769.1549.157.camel@localhost.localdomain |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-jdbc |
Tim,
Use setBigDecimal
Dave
On Wed, 2004-09-15 at 08:01, Tim Penhey wrote:
> Hi All,
>
> I have a plpgsql function that takes a numeric parameter. It is for a
> price in a table. The table has the price declared as numeric(10,2),
> and the function parameter is just numeric. However in Java I have the
> price represented as a double.
>
> Using jdbc setDouble for a parameter for the function causes causes an
> ERROR saying that the function taking a double precision parameter does
> not exist (which is obviously correct).
>
> What do other people do?
>
> Is there a way to pass a numeric parameter through JDBC?
> Should the parameter to the function be a double which is the "cast"
> into the numeric inside the function?
>
> Your ideas are welcome.
> Tim
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: you can get off all lists at once with the unregister command
> (send "unregister YourEmailAddressHere" to majordomo(at)postgresql(dot)org)
--
Dave Cramer
519 939 0336
ICQ # 14675561
www.postgresintl.com
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Paul Thomas | 2004-09-15 12:38:40 | Re: Calling functions with numeric parameters |
| Previous Message | Tim Penhey | 2004-09-15 12:01:32 | Calling functions with numeric parameters |