From: Tim Penhey <tim@penhey.net>
To: pgsql-jdbc@postgresql.org <pgsql-jdbc@postgresql.org>
Subject: Calling functions with numeric parameters
Date: Wed, 15 Sep 2004 13:01:32 +0100
Message-ID: <41482F1C.4060503@penhey.net> (raw)
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
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-jdbc@postgresql.org
Cc: tim@penhey.net
Subject: Re: Calling functions with numeric parameters
In-Reply-To: <41482F1C.4060503@penhey.net>
References: <41482F1C.4060503@penhey.net>
* 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