Re: [Fwd: Re: [Pljava-dev] char with trailing space, PreparedStatement.setObject

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Thomas Hallgren <thomas(at)tada(dot)se>
Cc: Kris Jurka <books(at)ejurka(dot)com>, "Pgsql-Jdbc(at)Postgresql(dot)Org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: [Fwd: Re: [Pljava-dev] char with trailing space, PreparedStatement.setObject
Date: 2006-06-27 21:07:56
Message-ID: 7957.1151442476@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Thomas Hallgren <thomas(at)tada(dot)se> 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

In response to

Responses

Browse pgsql-jdbc by date

  From Date Subject
Next Message Thomas Hallgren 2006-06-27 21:26:29 Re: [Fwd: Re: [Pljava-dev] char with trailing space, PreparedStatement.setObject
Previous Message Thomas Hallgren 2006-06-27 19:43:15 Re: [Fwd: Re: [Pljava-dev] char with trailing space, PreparedStatement.setObject