Re: Double-nesting quotes?

Поиск
Список
Период
Сортировка
От Cedar Cox
Тема Re: Double-nesting quotes?
Дата
Msg-id Pine.LNX.4.21.0104090156330.7109-100000@nanu.visionforisrael.com
обсуждение исходный текст
Ответ на Double-nesting quotes?  ("Josh Berkus" <josh@agliodbs.com>)
Список pgsql-sql
Carefully.  :)

Try: where_string := ''WHERE client_name ~* '''''' || s_client || '''''''';

(I think I got that right.)  The way I do it is to write it first as if
I'm not inside a function and not double my single quotes.  After I'm
done, go back and double all of them.. you're on you own if you need to
debug!

-Cedar


On Thu, 5 Apr 2001, Josh Berkus wrote:

> Folks,
> 
>     I'm writing some functions that make serious use of the EXECUTE
> functionality.  However, I need to do some string comparisons inside the
> execute statements ... how do I double-nest the single quote marks?
> 
> EXAMPLE:
> where_string := ''WHERE client_name ~* '''' || s_client || '''';
> 
>                     -Josh Berkus
> 
> ______AGLIO DATABASE SOLUTIONS___________________________
>                                        Josh Berkus
>   Complete information technology      josh@agliodbs.com
>    and data management solutions       (415) 565-7293
>   for law firms, small businesses        fax 621-2533
>     and non-profit organizations.      San Francisco
> 
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Don't 'kill -9' the postmaster
> 



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

Предыдущее
От: Cedar Cox
Дата:
Сообщение: Re: Need help with EXECUTE function
Следующее
От: Cedar Cox
Дата:
Сообщение: Re: please help