Re: Trouble Escaping Quotes - Mailing list pgsql-admin

From Richard Poole
Subject Re: Trouble Escaping Quotes
Date
Msg-id 20050123185859.GB2498@guests.deus.net
Whole thread Raw
In response to Re: Trouble Escaping Quotes  ("Haron, Charles" <charles.haron@cognitive.com>)
List 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?


Richard

pgsql-admin by date:

Previous
From: Mitchell Laks
Date:
Subject: how to make a trigger to copy files.
Next
From: Tom Lane
Date:
Subject: Re: how to make a trigger to copy files.