Re: createArrayOf, type resolved outside search_path on arrays of composite

Поиск
Список
Период
Сортировка
От Kris Jurka
Тема Re: createArrayOf, type resolved outside search_path on arrays of composite
Дата
Msg-id Pine.BSO.4.64.0809091919380.30865@leary.csoft.net
обсуждение исходный текст
Ответ на createArrayOf, type resolved outside search_path on arrays of composite  ("Jean-Pierre Pelletier" <jppelletier@e-djuster.com>)
Список pgsql-jdbc

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

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: "Jean-Pierre Pelletier"
Дата:
Сообщение: createArrayOf, type resolved outside search_path on arrays of composite
Следующее
От: "Krishnan Trikkadeeri"
Дата:
Сообщение: looking for a jdbc method.