From: Craig Ringer <craig@2ndquadrant.com>
To: David G Johnston <david.g.johnston@gmail.com>
To: pgsql-jdbc@postgresql.org
Subject: Re: How to implement a dynamic string into a sql statement?
Date: Wed, 27 Aug 2014 16:28:14 +0800
Message-ID: <53FD969E.6040208@2ndquadrant.com> (raw)
In-Reply-To: <1409077618913-5816359.post@n5.nabble.com>
References: <53FCC2CB.6080507@web.de>
<CAHKhnVW++z5zYWowQDb-ev-SJ8TYc-vRamFONnfoCk9K6VorMw@mail.gmail.com>
<1409077618913-5816359.post@n5.nabble.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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
--
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-jdbc@postgresql.org
Cc: craig@2ndquadrant.com, david.g.johnston@gmail.com
Subject: Re: How to implement a dynamic string into a sql statement?
In-Reply-To: <53FD969E.6040208@2ndquadrant.com>
References: <53FCC2CB.6080507@web.de> <CAHKhnVW++z5zYWowQDb-ev-SJ8TYc-vRamFONnfoCk9K6VorMw@mail.gmail.com> <1409077618913-5816359.post@n5.nabble.com> <53FD969E.6040208@2ndquadrant.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox