Re: How to implement a dynamic string into a sql statement?

Поиск
Список
Период
Сортировка
От Craig Ringer
Тема Re: How to implement a dynamic string into a sql statement?
Дата
Msg-id 53FD969E.6040208@2ndquadrant.com
обсуждение исходный текст
Ответ на Re: How to implement a dynamic string into a sql statement?  (David G Johnston <david.g.johnston@gmail.com>)
Список pgsql-jdbc
On 08/27/2014 02:26 AM, David G Johnston wrote:
> Lussier, Denis wrote
>> Don't use prepared statements for DDL.
>
> Parameters only handle values, not identifiers.  DDL deals exclusively with
> identifiers.

Actually, that isn't strictly true, there are plenty of places where DDL
takes literals.

The fundamental difference is that anything going through ProcessUtility
isn't subject to parameter expansion and cannot be prepared with
parameters. Only plannable statements can have server-side parameters.

PgJDBC can still, if it chooses, perform client-side parameter
substitution on DDL, though.

--
 Craig Ringer                   http://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training & Services


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

Предыдущее
От: JasmineLiu
Дата:
Сообщение: Re: invalid byte sequence for encoding "UTF8": 0x00
Следующее
От: Albe Laurenz
Дата:
Сообщение: Re: invalid byte sequence for encoding "UTF8": 0x00