Skip site navigation (1) Skip section navigation (2)

Re: Trouble Escaping Quotes

From: Richard Poole <rp(at)guests(dot)deus(dot)net>
To: pgsql-admin(at)postgresql(dot)org
Cc: "Haron, Charles" <charles(dot)haron(at)cognitive(dot)com>
Subject: Re: Trouble Escaping Quotes
Date: 2005-01-23 18:59:00
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
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?


In response to

pgsql-admin by date

Next:From: Tom LaneDate: 2005-01-23 19:05:09
Subject: Re: how to make a trigger to copy files.
Previous:From: Mitchell LaksDate: 2005-01-23 18:47:53
Subject: how to make a trigger to copy files.

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group