Re: [Fwd: Re: [Pljava-dev] char with trailing space, PreparedStatement.setObject
В списке pgsql-jdbc по дате отправления:
| От | Thomas Hallgren |
|---|---|
| Тема | Re: [Fwd: Re: [Pljava-dev] char with trailing space, PreparedStatement.setObject |
| Дата | |
| Msg-id | 44A1B610.3020801@tada.se обсуждение исходный текст |
| Ответ на | Re: [Fwd: Re: [Pljava-dev] char with trailing space, PreparedStatement.setObject (Tom Lane <tgl@sss.pgh.pa.us>) |
| Список | pgsql-jdbc |
Tom Lane wrote: > 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. > > My mistake. I thought that given a statement like: SELECT p.name FROM people p WHERE p.zipcode = ? the actual type returned by SPI_getargtype would be inferred by the expression 'p.zipcode'. I guess that's not the case. Instead I need to provide the information earlier, like: SELECT p.name FROM people p WHERE p.zipcode = ?::varchar is that correct? If so, is there any way that I can automatically infer the best type? Regards, Thomas Hallgren
В списке pgsql-jdbc по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера