Re: problems with single quotes..

Поиск
Список
Период
Сортировка
От Luis Miguel Castañeda
Тема Re: problems with single quotes..
Дата
Msg-id B0001893457@correoserver.interlink.es
обсуждение исходный текст
Ответ на Re: problems with single quotes..  ("Megalex" <megalex@klanomega.com>)
Список pgsql-sql
El Thursday 04 January 2001 08:50, Megalex escribió:

> i already tried escaping it.. but the problem is
> with the singlequote-backslash-singlequote combinations..

I use something like this, and works fine for me:

create function quote(text) 
   returns text
   as '
   DECLARE
        quote text;
   BEGIN
        quote := ichar(39); -- quote
        return quote  || $1 || quote;
   END;' 
   language 'plpgsql'; 

-- 
Saludos, lmc@nova.es
_________________________________________________________________
I've lost my faith in nihilism


В списке pgsql-sql по дате отправления:

Предыдущее
От: tjennette@thomasnelson.com (Trace)
Дата:
Сообщение: SQL Joins
Следующее
От: CoL
Дата:
Сообщение: Re: Error trying to create a functional index.