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

From Tom Lane
Subject Re: [Fwd: Re: [Pljava-dev] char with trailing space, PreparedStatement.setObject
Date
Msg-id 7957.1151442476@sss.pgh.pa.us
Whole thread Raw
In response to Re: [Fwd: Re: [Pljava-dev] char with trailing space, PreparedStatement.setObject  (Thomas Hallgren <thomas@tada.se>)
Responses Re: [Fwd: Re: [Pljava-dev] char with trailing space, PreparedStatement.setObject  (Thomas Hallgren <thomas@tada.se>)
List pgsql-jdbc
Thomas Hallgren <thomas@tada.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

pgsql-jdbc by date:

Previous
From: Thomas Hallgren
Date:
Subject: Re: [Fwd: Re: [Pljava-dev] char with trailing space, PreparedStatement.setObject
Next
From: Thomas Hallgren
Date:
Subject: Re: [Fwd: Re: [Pljava-dev] char with trailing space, PreparedStatement.setObject