1 Reply Latest reply on Oct 24, 2006 4:40 PM by rand00

    Postgresql 8.1 JDBC driver issue + workaround

    sappenin

      I just intalled JBCS using a newly installed PostgreSql version 8.1 database (with the JDBC driver postgresql-8.1-407.jdbc3.jar). When the JBCS database tables get inited for the first time, I get an error saying the Postgresql doesn't have the function " information_schema._pg_keypositions" defined. This error prevents the SchemaUpdate from getting metadata about certain JDBC tables (like address, etc), which prevents some need JBCS tables from being created.

      After a little bit of digging, I found this post on the Hibernate website:
      http://forum.hibernate.org/viewtopic.php?t=957909&view=next&sid=541176386e61f228772f569b1fb42dee

      For whatever reason, the PostgreSql database function exists in the 8.0 databases, but not in the 8.1 databases. Essentially, the Java JDBC driver should know about this, but it doesn't. I'm guessing this will get addressed in a future pgsql JDBC driver release, but so far it has not.

      So, an easy workaround is to simply add the pgsql function per the hibernate forum post above.

      I thought I'd post this just in case somebody decides to move up to pgsql 8.1.

      david