From: | Cedar Cox <cedarc(at)visionforisrael(dot)com> |
---|---|
To: | Josh Berkus <josh(at)agliodbs(dot)com> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: Double-nesting quotes? |
Date: | 2001-04-08 23:03:21 |
Message-ID: | Pine.LNX.4.21.0104090156330.7109-100000@nanu.visionforisrael.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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(at)agliodbs(dot)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
>
From | Date | Subject | |
---|---|---|---|
Next Message | Cedar Cox | 2001-04-08 23:20:09 | Re: Casting numeric to text |
Previous Message | Cedar Cox | 2001-04-08 22:55:37 | Re: please help |