pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Paul Thomas <paul@tmsl.demon.co.uk>
To: Greg Alton <greg@cfdev.com>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Backslashes in Strings being removed
Date: Wed, 1 Jun 2005 22:21:56 +0100
Message-ID: <20050601222156.C9013@bacon> (raw)
In-Reply-To: <429E08A0.6050403@cfdev.com>
References: <429E08A0.6050403@cfdev.com>


On 01/06/2005 20:12 Greg Alton wrote:
> Hi All,
> 
> How should the backslash character be excaped before storing in pgsql? I 
> assumed it would be another backslach, but that doesn't seem to work and 
> the backslash is dropped.
> 
> My first post and excuse me if this is the wrong place or a frequently 
> asked question. I did not find any posts specific to this, but many of 
> you must have encountered it.

Use PreparedStatements and the driver will correctly escape it for you.

-- 
Paul Thomas
+------------------------------+-------------------------------------------+
| Thomas Micro Systems Limited | Software Solutions for Business           |
| Computer Consultants         | http://www.thomas-micro-systems-ltd.co.uk |
+------------------------------+-------------------------------------------+



view thread (2+ messages)

Message-ID: <20050601222156.C9013@bacon>
Permalink:  ../20050601222156.C9013@bacon/
Also on:    postgresql.org/message-id/20050601222156.C9013@bacon

 · 

reply

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: paul@tmsl.demon.co.uk, greg@cfdev.com
  Subject: Re: Backslashes in Strings being removed
  In-Reply-To: <20050601222156.C9013@bacon>
  References: <429E08A0.6050403@cfdev.com> <20050601222156.C9013@bacon>

* 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