Found a Bug in latest Driver (I THINK) and pg 8.4

From: Jason Tesser <jasontesser(at)gmail(dot)com>
To: pgsql-jdbc <pgsql-jdbc(at)postgresql(dot)org>
Subject: Found a Bug in latest Driver (I THINK) and pg 8.4
Date: 2010-06-01 13:06:43
Message-ID: AANLkTilWwc0VmfY7YP15OFt4d8VbcZEYmuXxM-Di58xN@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Steps to reproduce

1. You need 2 schema with a table of the same name
2. You need a stored proc that has the same name in each schema and takes
the table from step 1 as an INPUT parameter.
3. From here I created a custom type in Java essentially an object that
extends PGobject and Overrode the getValue() method and sets the Type when
constructed.
4. I am using "set search_path TO myschema" when i get a connection but the
Driver/PG gets confussed and will not call the right procedure because it
tries to call schema2.myproc(schema1.mytable)
Even when I set the type to the schema it doesn't work.

I tailed the query log and the query the the Driver runs to find the OID of
the composite type is based on table name and ignores the scehma even when I
use set search_path.

My only solution was to keep the table names unique even in different
schemas when using Composite Types and IN Params in Stored Procs.

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Kevin Grittner 2010-06-01 18:15:48 Re: Found a Bug in latest Driver (I THINK) and pg 8.4
Previous Message Radosław Smogura 2010-05-29 09:12:56 Re: Using java.lang.Character for "char" data type