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 7634D9FA3CD for ; Tue, 27 Jun 2006 19:31:30 -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 10777-08 for ; Tue, 27 Jun 2006 19:31:25 -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 D332E9F9DCC for ; Tue, 27 Jun 2006 19:31:25 -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 k5RMVNqB008537; Tue, 27 Jun 2006 18:31:23 -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: <44A1A285.6000900@tada.se> References: <44A16388.3060108@tada.se> <44A1739A.2080102@tada.se> <26695.1151435851@sss.pgh.pa.us> <44A18A53.5000107@tada.se> <7957.1151442476@sss.pgh.pa.us> <44A1A285.6000900@tada.se> Comments: In-reply-to Thomas Hallgren message dated "Tue, 27 Jun 2006 23:26:29 +0200" Date: Tue, 27 Jun 2006 18:31:23 -0400 Message-ID: <8536.1151447483@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200606/122 X-Sequence-Number: 15402 Thomas Hallgren writes: > My problem is simple. When I pass a parameter with a trailing space, > that space is considered significant. When the same thing is done using > the client jdbc driver, the trailing space is insignificant. Your problem is not simple, and that's not an adequate description of it, because you are omitting the influence of context on what the parameter gets typed as. The real point here is that the JDBC driver is doing something to prompt the parser to resolve the types of parameter symbols in particular ways, and (I gather) you're doing something different. If you want to match the results they get, then you need to supply the same type information for parameter symbols to SPI_prepare as they put into Parse messages. regards, tom lane