Re: Prepared Statements

Поиск
Список
Период
Сортировка
От Dmitry Tkach
Тема Re: Prepared Statements
Дата
Msg-id 3F186430.8030908@openratings.com
обсуждение исходный текст
Ответ на Re: Prepared Statements  (Darin Ohashi <DOhashi@maplesoft.com>)
Список pgsql-jdbc
>
>
>Just as a data point, both postgresql's documentation for PREPARE
>
>http://www.postgresql.org/docs/view.php?version=7.3&idoc=0&file=sql-prepare.html
>
>and IBM's
>
>http://www-3.ibm.com/cgi-bin/db2www/data/db2/udb/winos2unix/support/document.d2w
>/report?fn=db2v7s0sqls0645.htm#HDRPREPH2
>
>imply that only data can be passed in.  Its by implication because they discuss
>the "data" having a "datatype".  I'm not sure this would make sense if you were
>allowed to pass in strings containing SQL syntax.
>
>
>
That's fine.
I just don't know why you refuse to call a set, containing numbers (or
strings or whatever else) 'data'...
What about arrays by the way?
Is {1,2,3,4} not 'data' too?

There is a similar problem with arrays in the current driver (that is
just about to become worth with this patch) too -
the only way I know to send in an array to a statement like

update mytable set array_field = ? where id=?

is, again, to use setObject () with the properly constructed string
representation of the array
(there is a setArray(), but no way to construct the actual
java.sql.Array object to pass there)

It sounds like we are about to arrive to the new definition of 'data' as
"something that is supported by our jdbc driver" :-)

Dima



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

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