X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 8F467329EE9 for ; Fri, 8 Oct 2004 04:04:54 +0100 (BST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 48111-03 for ; Fri, 8 Oct 2004 03:04:52 +0000 (GMT) Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by svr1.postgresql.org (Postfix) with ESMTP id B3AF3329CB7 for ; Fri, 8 Oct 2004 04:04:51 +0100 (BST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.1/8.13.1) with ESMTP id i9834fPa027751; Thu, 7 Oct 2004 23:04:41 -0400 (EDT) To: Oliver Jowett Cc: pgsql-jdbc@postgresql.org Subject: Re: Fix setArray() when using the v3 protocol (was Re: Postgres 8.0 + JDBC) In-reply-to: <4165F7B2.70705@opencloud.com> References: <002901c4aaf7$feabc310$a5010a0a@Johann> <4162FFC9.3010808@opencloud.com> <4164CBA2.80600@opencloud.com> <4165F7B2.70705@opencloud.com> Comments: In-reply-to Oliver Jowett message dated "Fri, 08 Oct 2004 15:13:06 +1300" Date: Thu, 07 Oct 2004 23:04:41 -0400 Message-ID: <27750.1097204681@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests= X-Spam-Level: X-Archive-Number: 200410/59 X-Sequence-Number: 11164 Oliver Jowett 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