Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 5C38A9FA37A for ; Wed, 13 Dec 2006 13:21:23 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-new, port 10024) with ESMTP id 21169-09-2 for ; Wed, 13 Dec 2006 13:21:19 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from nz-out-0506.google.com (nz-out-0506.google.com [64.233.162.238]) by postgresql.org (Postfix) with ESMTP id 72ECB9FA282 for ; Wed, 13 Dec 2006 13:21:19 -0400 (AST) Received: by nz-out-0506.google.com with SMTP id i11so115453nzh for ; Wed, 13 Dec 2006 09:21:18 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:user-agent:mime-version:to:cc:subject:references:in-reply-to:content-type:content-transfer-encoding:sender; b=gKOw46EIqN0wAqvolVLZOozqF+vxwmIiprVGtsNhUcL2K0iLrhAB4zktMOcaP3Puo7/Gzo08Id2z8GMS+qMtvK77qMvgNvoVblZOSRdFjEbbVTTu1h8FCD52CMym6DlNeMh5ZtFAqeYtIvIec3WhB9uHJQIA4rTyfEn9lGgzMEE= Received: by 10.78.185.7 with SMTP id i7mr800201huf.1166030477819; Wed, 13 Dec 2006 09:21:17 -0800 (PST) Received: from ?192.168.0.20? ( [62.232.55.118]) by mx.google.com with ESMTP id 33sm1115268hue.2006.12.13.09.21.15; Wed, 13 Dec 2006 09:21:16 -0800 (PST) Message-ID: <4580368D.8070300@enterprisedb.com> Date: Wed, 13 Dec 2006 17:21:17 +0000 From: Heikki Linnakangas User-Agent: Icedove 1.5.0.8 (X11/20061116) MIME-Version: 1.0 To: David Nedrow CC: pgsql-jdbc@postgresql.org Subject: Re: String escaping? References: <50899926-5B68-42EC-B126-75EBC7E38BF4@mac.com> In-Reply-To: <50899926-5B68-42EC-B126-75EBC7E38BF4@mac.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200612/66 X-Sequence-Number: 16298 David Nedrow wrote: > Are there any build-in JDK or JDBC (Sun or Postgresql driver) functions > for escaping strings before inserting/updating in the DB? > > Eg., I'm using the following PreparedStatement... You don't generally need to escape your strings if you're using PreparedStatements. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com