Re: Prepared Statements

Поиск
Список
Период
Сортировка
От Csaba Nagy
Тема Re: Prepared Statements
Дата
Msg-id 1058542355.24801.309.camel@coppola.ecircle.de
обсуждение исходный текст
Ответ на Re: Prepared Statements  (Fernando Nasser <fnasser@redhat.com>)
Ответы Re: Prepared Statements  (Felipe Schnack <felipes@ritterdosreis.br>)
Список pgsql-jdbc
>
> Well, I guess the bug will have be fixed asap as it is a security risk.
>
> What is the proper JDBC way for filling IN lists in prepared statements?
>

I'm no JDBC expert, but the way we do it: create a prepared statement
with 100 (or whatever the max nr. of accepted params is) parameter
placeholders, and set the ones which are actually needed to their
parameter values, and set the rest to null.
The nulls will be finally ignored by the database.
Not the best solution, but it works just fine for us.

Cheers,
Csaba.



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

Предыдущее
От: Fernando Nasser
Дата:
Сообщение: Re: Prepared Statements
Следующее
От: Dmitry Tkach
Дата:
Сообщение: Re: Prepared Statements