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