pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Richard Poole <rp@guests.deus.net>
To: pgsql-admin@postgresql.org
Cc: Haron, Charles <charles.haron@cognitive.com>
Subject: Re: Trouble Escaping Quotes
Date: Sun, 23 Jan 2005 18:59:00 +0000
Message-ID: <20050123185859.GB2498@guests.deus.net> (raw)
In-Reply-To: <593E515C9586D511BB4500010283D5E2025649A9@COG-MAIL>
References: <593E515C9586D511BB4500010283D5E2025649A9@COG-MAIL>

On Fri, Jan 21, 2005 at 08:43:00AM -0700, Haron, Charles wrote:
> Yes, but how do you escape the quote when the value of the string isn't know
> until the function is run? 
> 
> If $rma_data->{\'company_name\'} is returning Bob's Fixit at run time, how
> do escape the quote BEFORE Perl interprets the string and generates an
> error?

Your quote-escaping looks fine to me; \' is just as good as '', although
less standard. I can't reproduce your problem here; your function works
for me under 8.0.0 and perl 5.8.6 . What's your error message when you
call it? Are you sure that your problem isn't happening earlier, when
you put the data into the database in the first place?


Richard



view thread (9+ messages)  latest in thread

Message-ID: <20050123185859.GB2498@guests.deus.net>
Permalink:  ../20050123185859.GB2498@guests.deus.net/
Also on:    postgresql.org/message-id/20050123185859.GB2498@guests.deus.net

 · 

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: rp@guests.deus.net, charles.haron@cognitive.com
  Subject: Re: Trouble Escaping Quotes
  In-Reply-To: <20050123185859.GB2498@guests.deus.net>
  References: <593E515C9586D511BB4500010283D5E2025649A9@COG-MAIL> <20050123185859.GB2498@guests.deus.net>

* 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