Re: [Fwd: Re: [Pljava-dev] char with trailing space, PreparedStatement.setObject
| От | Tom Lane |
|---|---|
| Тема | Re: [Fwd: Re: [Pljava-dev] char with trailing space, PreparedStatement.setObject |
| Дата | |
| Msg-id | 8536.1151447483@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: [Fwd: Re: [Pljava-dev] char with trailing space, PreparedStatement.setObject (Thomas Hallgren <thomas@tada.se>) |
| Ответы |
Re: [Fwd: Re: [Pljava-dev] char with trailing space, PreparedStatement.setObject
|
| Список | pgsql-jdbc |
Thomas Hallgren <thomas@tada.se> 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
В списке pgsql-jdbc по дате отправления: