| От | Tom Lane |
|---|---|
| Тема | Re: PQexecParams and types |
| Дата | |
| Msg-id | 17666.1075819993@sss.pgh.pa.us обсуждение |
| Ответ на | PQexecParams and types (Czuczy Gergely <phoemix@harmless.hu>) |
| Ответы |
Re: PQexecParams and types
|
| Список | pgsql-performance |
Czuczy Gergely <phoemix@harmless.hu> writes:
> i've read in the docs to use the proper indexes both types must match in
> the where clause, to achive this the user can simply put a string into the
> side of the equation mark and pgsql will convert it automaticly. my
> question is, when I'm using PQexecParams, should I give all the values as
> a string, and it will be converted, or I have to figure out the type of
> the given field somehow?
You should leave the parameter types unspecified. Their types will be
resolved in much the same way that a quoted literal is handled.
regards, tom lane
В списке pgsql-performance по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера