X-Original-To: pgsql-jdbc-postgresql.org@postgresql.org Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 7823A9FA437 for ; Tue, 27 Jun 2006 18:08:26 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 00210-06 for ; Tue, 27 Jun 2006 18:08:20 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id 574ED9FA10A for ; Tue, 27 Jun 2006 18:08:19 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.13.6/8.13.6) with ESMTP id k5RL7uoq007958; Tue, 27 Jun 2006 17:07:57 -0400 (EDT) To: Thomas Hallgren cc: Kris Jurka , "Pgsql-Jdbc@Postgresql.Org" Subject: Re: [Fwd: Re: [Pljava-dev] char with trailing space, PreparedStatement.setObject In-reply-to: <44A18A53.5000107@tada.se> References: <44A16388.3060108@tada.se> <44A1739A.2080102@tada.se> <26695.1151435851@sss.pgh.pa.us> <44A18A53.5000107@tada.se> Comments: In-reply-to Thomas Hallgren message dated "Tue, 27 Jun 2006 21:43:15 +0200" Date: Tue, 27 Jun 2006 17:07:56 -0400 Message-ID: <7957.1151442476@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/120 X-Sequence-Number: 15400 Thomas Hallgren writes: > Hmm, OK. I checked my code and I don't use any specific type. Instead, I > use SPI_getargtypeid(ePlan, idx) on the prepared query and the > pgType->typinput function of the type that corresponds to the returned > oid. Perhaps the SPI_getargtypeid should return varchar for all text types? Certainly not. That would break most normal uses of SPI_getargtypeid, and I don't even see how it fixes your problem; once the query is prepared these decisions are already made. regards, tom lane