pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: jseymour@linxnet.com
To: pgsql-admin@postgresql.org
Subject: Re: Problem saving some characters
Date: Mon, 21 Jun 2004 09:26:05 -0400 (EDT)
Message-ID: <20040621132605.A42D84310@jimsun.linxnet.com> (raw)
In-Reply-To: <20040621130421.94999.qmail@web40701.mail.yahoo.com>

"=?iso-8859-1?q?Eduardo=20S.=20Fontanetti?=" <dufuzzy@yahoo.com.br> wrote:
> 
> Hello,
> 
> I am trying to save a directory name on the Postgres,
> but it is "cutting" some characters, and the result is
> being diferent, and then, my app don't work properly.
> 
> Example:
> 
> I am trying to save "S:\directory\app" to a text field
> on the Postgres.
> When I do a  Select, it returns "S:directoryapp".
[snip]

That's because back-slashes are escape characters to pgsql.  You need
to escape them (yes: escape the escape chars) in order to get them into
the db.  This also means that anytime you may wish to search on these,
you'll have to properly escape the escapes.  And so-on.

I believe if you thoroughly peruse the docs, you'll find this noted.

Jim



view thread (3+ messages)  latest in thread

Message-ID: <20040621132605.A42D84310@jimsun.linxnet.com>
Permalink:  ../20040621132605.A42D84310@jimsun.linxnet.com/
Also on:    postgresql.org/message-id/20040621132605.A42D84310@jimsun.linxnet.com

 · 

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-admin@postgresql.org
  Cc: jseymour@linxnet.com
  Subject: Re: Problem saving some characters
  In-Reply-To: <20040621132605.A42D84310@jimsun.linxnet.com>
  References: <20040621130421.94999.qmail@web40701.mail.yahoo.com> <20040621132605.A42D84310@jimsun.linxnet.com>

* 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