Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.80) (envelope-from ) id 1XMYaf-00076l-UO for pgsql-jdbc@arkaria.postgresql.org; Wed, 27 Aug 2014 08:28:26 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.80) (envelope-from ) id 1XMYae-0005S7-LY for pgsql-jdbc@arkaria.postgresql.org; Wed, 27 Aug 2014 08:28:24 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XMYae-0005S1-1j for pgsql-jdbc@postgresql.org; Wed, 27 Aug 2014 08:28:24 +0000 Received: from mout.kundenserver.de ([212.227.126.187]) by magus.postgresql.org with esmtps (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1XMYab-0003jE-Hj for pgsql-jdbc@postgresql.org; Wed, 27 Aug 2014 08:28:23 +0000 Received: from ayaki.localdomain (58-7-83-112.dyn.iinet.net.au [58.7.83.112]) by mrelayeu.kundenserver.de (node=mreue001) with ESMTP (Nemesis) id 0MbXng-1X3vHC1216-00Ip8e; Wed, 27 Aug 2014 10:28:19 +0200 Message-ID: <53FD969E.6040208@2ndquadrant.com> Date: Wed, 27 Aug 2014 16:28:14 +0800 From: Craig Ringer Organization: 2nd Quadrant User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.7.0 MIME-Version: 1.0 To: David G Johnston , pgsql-jdbc@postgresql.org Subject: Re: How to implement a dynamic string into a sql statement? References: <53FCC2CB.6080507@web.de> <1409077618913-5816359.post@n5.nabble.com> In-Reply-To: <1409077618913-5816359.post@n5.nabble.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Provags-ID: V02:K0:k8iaRZTWCflCZZ0dGEUEa6mDzj9F+jgRMAklHjwAJCY uXyZopKlXR1nHfYyzqRcSFeEC1uIzhvZNT+MKdm/oPeOG304MX K/foD2HLOfsnajoi+ZGE3LjM2R9sBCT4uT6Tu0+JA2nLK4cys7 G7mX8nygmgWZ1vA6ou4ApCgfHwqVB38TUkM9vcEWw8RvIPpwem 4B77/z4a4nZ655OPDaeGAErbIPqnxg6Jtff3V63klnt6vzHdnb PEpsufA+UwVPLX9J3e+4iPw/OYOudUHRqhw3k6Zw6l2uvq740S KODtKQX/m5zN9/SElT4U3Bu3qMg5EQd32IPDYggWHKs2sQXvoW fiut3ryFsSf5adyPcVr/B8fQmzrO0h2M3NlLw3DvY X-UI-Out-Filterresults: notjunk:1; X-Pg-Spam-Score: -1.9 (-) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-jdbc Precedence: bulk Sender: pgsql-jdbc-owner@postgresql.org 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