On Wed, 5 Dec 2007, Michael Han wrote:
> The following bug has been logged online:
>
> Bug reference: 3800
> PostgreSQL version: 8.2
> Description: Java/Postgres PreparedStatement returns stale data
> Details:
>
> PROBLEM : Java/Postgres Returns Stale data when underlying Table View is
> Replaced
Prior to the 8.3 release, prepared plans don't notice when underlying
objects change. Aside from waiting for 8.3, the only workaround is to
prevent the JDBC driver from reusing the same server plan. By default
the JDBC driver reuses the server plan after the 5th execution, and you
can adjust this by the prepareThreshold URL parameter. You can disable
plan reuse by adding prepareThreshold=0.
Kris Jurka