pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Backslashes in Strings being removed
2+ messages / 2 participants
[nested] [flat]

* Backslashes in Strings being removed
@ 2005-06-01 19:12  Greg Alton <greg@cfdev.com>
  0 siblings, 1 reply; 2+ messages in thread

From: Greg Alton @ 2005-06-01 19:12 UTC (permalink / raw)
  To: pgsql-jdbc

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.

Greg Alton
ActivSoftware
http://www.activsoftware.com

Attachments:

  smime.p7s (application/x-pkcs7-signature, 3.1K) download

^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Backslashes in Strings being removed
@ 2005-06-01 21:21  Paul Thomas <paul@tmsl.demon.co.uk>
  parent: Greg Alton <greg@cfdev.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Paul Thomas @ 2005-06-01 21:21 UTC (permalink / raw)
  To: Greg Alton <greg@cfdev.com>; +Cc: pgsql-jdbc


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 |
+------------------------------+-------------------------------------------+



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2005-06-01 21:21 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-06-01 19:12 Backslashes in Strings being removed Greg Alton <greg@cfdev.com>
2005-06-01 21:21 ` Paul Thomas <paul@tmsl.demon.co.uk>

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