From: Oliver Jowett <oliver@opencloud.com>
To: Donny Tjandra <dtjandra@pcthome.com>
Cc: 'pgsql-jdbc@postgresql.org' <pgsql-jdbc@postgresql.org>
Subject: Re: PostgreSQL 8, JDBC 8 and JSTL problems
Date: Thu, 23 Jun 2005 11:51:07 +1200
Message-ID: <42B9F96B.7000901@opencloud.com> (raw)
In-Reply-To: <E4987A7A1042D511848F0008C71BB06B04D8EC1D@PCT_EXCH>
References: <E4987A7A1042D511848F0008C71BB06B04D8EC1D@PCT_EXCH>
Donny Tjandra wrote:
> <sql:query var="properties">
> select *
> from get_property_rates(?,?,?,?)
>
> <sql:param value="${firstDate}"/>
> <sql:param value="${lastDate}"/>
> <sql:param value="${brandLocationId}"/>
> <sql:param value="1"/>
> </sql:query>
>
> Unfortunately the type mapping somewhere between JSTL, JDBC and
> PostgreSQL is broken and I get function not exist errors like:
>
> ERROR: function get_property_rates(character varying, character varying,
> integer, character varying) does not exist.
> All this worked fine with PostgreSQL 7. I'm not sure how many others out
> there run into this issue and how they get around it (maybe create
> wrapper functions that takes all text parameters), or if there are plans
> to add smarter type mapping in future versions of the driver.
Search the archives -- it's not really practical to add "smarter type
mapping" (really, less strict typing) at the driver level.
The "right fix" is to fix the parameter types being given to JDBC by the
JSTL layer. I'm not familiar with JSTL -- does <sql:param> let you
specify a parameter type? At the JDBC level you can, so I suppose you
can in JSTL.
BTW it's a driver change, not a backend change, that changed parameter
typing behaviour between 7.x and 8.x, so if you are going to revert you
should only need to revert the driver.
-O
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: oliver@opencloud.com, dtjandra@pcthome.com
Subject: Re: PostgreSQL 8, JDBC 8 and JSTL problems
In-Reply-To: <42B9F96B.7000901@opencloud.com>
References: <E4987A7A1042D511848F0008C71BB06B04D8EC1D@PCT_EXCH> <42B9F96B.7000901@opencloud.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