From: Mark Lewis <mark.lewis@mir3.com>
To: Heikki Linnakangas <heikki@enterprisedb.com>
Cc: David Nedrow <dnedrow@mac.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: String escaping?
Date: Wed, 13 Dec 2006 09:47:46 -0800
Message-ID: <1166032066.27428.92.camel@archimedes> (raw)
In-Reply-To: <4580368D.8070300@enterprisedb.com>
References: <50899926-5B68-42EC-B126-75EBC7E38BF4@mac.com>
<4580368D.8070300@enterprisedb.com>
The only exception to this rule is backslashes and (when using LIKE) the
'%' and '_' characters. Although if you're running 8.2 and turn the
standard_conforming_strings setting ON then you don't need to worry
about backslashes.
-- Mark Lewis
On Wed, 2006-12-13 at 17:21 +0000, Heikki Linnakangas wrote:
> 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.
>
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: mark.lewis@mir3.com, heikki@enterprisedb.com, dnedrow@mac.com
Subject: Re: String escaping?
In-Reply-To: <1166032066.27428.92.camel@archimedes>
References: <50899926-5B68-42EC-B126-75EBC7E38BF4@mac.com> <4580368D.8070300@enterprisedb.com> <1166032066.27428.92.camel@archimedes>
* 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