Re: Trouble Escaping Quotes

Поиск
Список
Период
Сортировка
От Richard Poole
Тема Re: Trouble Escaping Quotes
Дата
Msg-id 20050123185859.GB2498@guests.deus.net
обсуждение исходный текст
Ответ на Re: Trouble Escaping Quotes  ("Haron, Charles" <charles.haron@cognitive.com>)
Список 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 по дате отправления:

Предыдущее
От: Mitchell Laks
Дата:
Сообщение: how to make a trigger to copy files.
Следующее
От: Tom Lane
Дата:
Сообщение: Re: how to make a trigger to copy files.