Re: Prepared statement with function as argument: how to bind values?

Поиск
Список
Период
Сортировка
От Maciek Sakrejda
Тема Re: Prepared statement with function as argument: how to bind values?
Дата
Msg-id CAH_hXRas_aMNSbotahEuMTHU6KjgwJsztEO9K1hY+7gEXY_NCA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Prepared statement with function as argument: how to bind values?  (Dave Cramer <pg@fastcrypt.com>)
Список pgsql-jdbc
> Do you have to quote 'POINT(?,?)'

Since that's an argument to ST_GeomFrom*Text*, I imagine he does. Or
do you mean is he quoting the parameter value with SQL apostrophe
quotes, which he shouldn't?. In any case, that looks like a weird
API--if there's a different function you can call, Alex, that will
take an actual point object, that would probably make your life
easier.

If this is all you have to work with, the problem is that you can't
parameterize a text literal. I think you would need to pass the full
String 'POINT(34.567 45.5621)' as a jdbc parameter value. However, I
don't quite understand the error you're getting. I would expect
complains about extra parameters, not about the number of columns
(which looks legit).

---
Maciek Sakrejda | System Architect | Truviso

1065 E. Hillsdale Blvd., Suite 215
Foster City, CA 94404
(650) 242-3500 Main
www.truviso.com

В списке pgsql-jdbc по дате отправления:

Предыдущее
От: Radosław Smogura
Дата:
Сообщение: Re: use of savepoint in containter managed transaction
Следующее
От: Mikko Tiihonen
Дата:
Сообщение: Re: Binary transfer patches v15 - sending part was missing