Re: JDBC Support for standard_conforming_strings

Поиск
Список
Период
Сортировка
От Kris Jurka
Тема Re: JDBC Support for standard_conforming_strings
Дата
Msg-id Pine.BSO.4.63.0611060130450.23864@leary2.csoft.net
обсуждение исходный текст
Ответ на JDBC Support for standard_conforming_strings  (Michael Paesold <mpaesold@gmx.at>)
Ответы Re: JDBC Support for standard_conforming_strings  (Michael Paesold <mpaesold@gmx.at>)
Список pgsql-jdbc

On Sun, 5 Nov 2006, Michael Paesold wrote:

> Regarding standard_conforming_strings, I am currently reading through the
> code and looking at all places that need to understand string escaping rules.
>
> I have found two issues where I need more advice:
>
> arrays (org.postgresql.jdbc2.AbstractJdbc2Array)
> bytea (org.postgresql.util.PGbytea)
>
> As far as I understand, quoting in arrays and bytea only changes as far as
> the types are passing through the backend parser as string-literals. Correct?
>
> Since the result of AbstractJdbc2Array.toString() and PGbytea.toPGString()
> will be fed to PreparedStatement.setString() in the end, we do not have to
> change the array or bytea code. Is this reasoning valid?

Right.  The parameters will either be sent out of line which won't require
escaping or for the V2 path they will be sent in the query, but it isn't
the array or bytea codes' responsibility to escape them correctly.  The
code in core.v2.SimpleParameterList@setStringParameter should handle that
for us.

Kris Jurka

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

Предыдущее
От: Kris Jurka
Дата:
Сообщение: Re: [PATCH] Comments in PGbytea byte[] to pgstring conversion
Следующее
От: Michael Paesold
Дата:
Сообщение: Re: JDBC Support for standard_conforming_strings