Re: Using backslash in query - Mailing list pgsql-hackers

From Andrew Dunstan
Subject Re: Using backslash in query
Date
Msg-id 004201c38a6b$0a888a00$6401a8c0@DUNSLANE
Whole thread Raw
In response to Using backslash in query  (Michael Brusser <michael@synchronicity.com>)
Responses Re: Using backslash in query  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
----- Original Message ----- 
From: "Hannu Krosing" <hannu@tm.ee>
>
> Regarding the dollar-quoting discussions -
>
> Will we be able to write the above query as
>
> SELECT smth. FROM  tbl WHERE WHERE situation LIKE $$%\\%$$;
>

Yes, as I understand it (as long as you remove the one of the WHEREs :-) ).
If not we need some rethinking.  Think of this as our equivalent of XML's
CDATA quoting - you don't need to escape & or < or > inside a CDATA node.


> in 7.4 or is \ still special there ?

I don't believe so.


cheers

andrew



pgsql-hackers by date:

Previous
From: Christopher Kings-Lynne
Date:
Subject: Re: Weird locking situation
Next
From: Andrew Dunstan
Date:
Subject: Re: Using backslash in query