Re: [HACKERS] Using backslash in query

2003-10-04 Thread Tom Lane
Hannu Krosing <[EMAIL PROTECTED]> writes: > Regarding the dollar-quoting discussions - > Will we be able to write the above query as > SELECT smth. FROM tbl WHERE WHERE situation LIKE $$%\\%$$; > in 7.4 or is \ still special there ? We were discussing that for 7.5 not 7.4. But yeah, it would w

Re: [HACKERS] Using backslash in query

2003-10-04 Thread Andrew Dunstan
but this will be in 7.5, not 7.4, won't it? Andrew Dunstan wrote: - Original Message - From: "Hannu Krosing" <[EMAIL PROTECTED]> Regarding the dollar-quoting discussions - Will we be able to write the above query as SELECT smth. FROM tbl WHERE WHERE situation LIKE $$%\\%$$; Y

Re: [HACKERS] Using backslash in query

2003-10-04 Thread Andrew Dunstan
- Original Message - From: "Hannu Krosing" <[EMAIL PROTECTED]> > > 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 WH

Re: [HACKERS] Using backslash in query

2003-10-04 Thread Hannu Krosing
Tom Lane kirjutas R, 03.10.2003 kell 18:34: > Michael Brusser <[EMAIL PROTECTED]> writes: > > But when I doubled the number of backslashes: > > SELECT smth. FROM tbl WHERE situation LIKE '%%'; > > - it actually worked fine. > > Backslash is special to both the string-literal parser and the

Re: [HACKERS] Using backslash in query

2003-10-03 Thread Tom Lane
Michael Brusser <[EMAIL PROTECTED]> writes: > But when I doubled the number of backslashes: > SELECT smth. FROM tbl WHERE situation LIKE '%%'; > - it actually worked fine. Backslash is special to both the string-literal parser and the LIKE code. So when you write the above, the pattern valu

[HACKERS] Using backslash in query

2003-10-03 Thread Michael Brusser
I'm afraid I'm confused about something very simple... but anyway I need to run a query on a varchar field containing a backslash. My first attempt looked like this: SELECT smth. FROM tbl WHERE situation LIKE '%\\%'; This did not returned any rows. I looked up for a reference, confirmed that "