On Tue, 9 Sep 2008, Jean-Pierre Pelletier wrote:
> I've got a composite type testtype and a function
> testfunction(testtype[]) of the same name in two schemas. The function
> is called with callableStatement and the parameter set with
> createArrayOf() of jdbc 4. The error received when calling the function:
> ERROR: function testfunction(testschema1.testtype[]) does not exist
> suggests that the unqualified type is resolved to a type from a schema
> not in the search_path.
The problem is actually that the type cache is not schema aware. So it
first resolves the name to an OID in testschema1 and when you call it
again with the same name, the driver doesn't bother checking the
search path or the database and simply uses the OID it resolved
previously. I don't know of any workaround for this other than using type
names that are unique across schemas.
Kris Jurka