Re: Fix setArray() when using the v3 protocol (was Re: Postgres 8.0 + JDBC) - Mailing list pgsql-jdbc

From Tom Lane
Subject Re: Fix setArray() when using the v3 protocol (was Re: Postgres 8.0 + JDBC)
Date
Msg-id 27750.1097204681@sss.pgh.pa.us
Whole thread Raw
In response to Fix setArray() when using the v3 protocol (was Re: Postgres 8.0 + JDBC)  (Oliver Jowett <oliver@opencloud.com>)
Responses Re: Fix setArray() when using the v3 protocol (was Re: Postgres
List pgsql-jdbc
Oliver Jowett <oliver@opencloud.com> writes:
> !         // Use a typename that is "_" plus the base type; this matches how the
> !         // backend looks for array types.
> !         String typename = "_" + x.getBaseTypeName();
> !         int oid = connection.getPGType(typename);
> !         if (oid == Oid.INVALID)
> !             throw new PSQLException("postgresql.prep.typenotfound", PSQLState.INVALID_PARAMETER_TYPE, typename);

Er, what about schema-qualified type names?  Also, are you sure that
getBaseTypeName will return the correct internal type name, eg "int8"
not "bigint"?

            regards, tom lane

pgsql-jdbc by date:

Previous
From: Kris Jurka
Date:
Subject: Re: Using gettext (was Translation updates: errors_ru.properties)
Next
From: Oliver Jowett
Date:
Subject: tightening up on use of oid 0