From: | Craig Ringer <craig(at)2ndquadrant(dot)com> |
---|---|
To: | David G Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>, pgsql-jdbc(at)postgresql(dot)org |
Subject: | Re: How to implement a dynamic string into a sql statement? |
Date: | 2014-08-27 08:28:14 |
Message-ID: | 53FD969E.6040208@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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
From | Date | Subject | |
---|---|---|---|
Next Message | Albe Laurenz | 2014-08-27 08:44:34 | Re: invalid byte sequence for encoding "UTF8": 0x00 |
Previous Message | JasmineLiu | 2014-08-27 08:22:45 | Re: invalid byte sequence for encoding "UTF8": 0x00 |