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

PostgreSQL 8, JDBC 8 and JSTL problems

From: Donny Tjandra <dtjandra(at)pcthome(dot)com>
To: "'pgsql-jdbc(at)postgresql(dot)org'" <pgsql-jdbc(at)postgresql(dot)org>
Subject: PostgreSQL 8, JDBC 8 and JSTL problems
Date: 2005-06-22 23:18:28
Message-ID: E4987A7A1042D511848F0008C71BB06B04D8EC1D@PCT_EXCH (view raw, whole thread or download thread mbox)
Lists: pgsql-jdbc
I'm having problems with PostgreSQL 8, JDBC driver 8 and JSTL that I'm not
sure how to fix without major rework or reverting to version 7 PostgreSQL
and JDBC driver. JSTL does automatic type conversion that doesn't seem to
work well with PostgreSQL and JDBC driver 8. For example I have function
defined like this in PostgreSQL:

CREATE OR REPLACE FUNCTION get_property_list(text, date, int4, int4)

Then I call the function from JSTL using sql tags like:

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

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.


pgsql-jdbc by date

Next:From: Oliver JowettDate: 2005-06-22 23:51:07
Subject: Re: PostgreSQL 8, JDBC 8 and JSTL problems
Previous:From: Kris JurkaDate: 2005-06-21 15:56:51
Subject: Re: Bug in JDBC driver w/BLOBs

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