Skip site navigation (1) Skip section navigation (2)

Re: PostgreSQL 8, JDBC 8 and JSTL problems

From: Oliver Jowett <oliver(at)opencloud(dot)com>
To: Donny Tjandra <dtjandra(at)pcthome(dot)com>
Cc: "'pgsql-jdbc(at)postgresql(dot)org'" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: PostgreSQL 8, JDBC 8 and JSTL problems
Date: 2005-06-22 23:51:07
Message-ID: 42B9F96B.7000901@opencloud.com (view raw or flat)
Thread:
Lists: pgsql-jdbc
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

In response to

pgsql-jdbc by date

Next:From: Frank BeullensDate: 2005-06-24 10:31:27
Subject: Problem with version 8 Driver
Previous:From: Donny TjandraDate: 2005-06-22 23:18:28
Subject: PostgreSQL 8, JDBC 8 and JSTL problems

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group