escape character \

From: "Jose' Soares Da Silva" <sferac(at)proxy(dot)bazzanese(dot)com>
To: pgsql/questions(at)postgreSQL(dot)org
Cc: pgsql-hackers(at)postgreSQL(dot)org, sferac(at)bo(dot)nettuno(dot)it
Subject: escape character \
Date: 1998-04-16 11:10:30
Message-ID: Pine.LNX.3.96.980416110548.743A-100000@proxy.bazzanese.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Seems there's a bug using ESCAPE character (\) on LIKE clause:

prova=> create table tmp ( a text);
CREATE
prova=> insert into tmp values('\\');
INSERT 178729 1
prova=> select * from tmp where a = '\\';
a
--
\\
(1 row)

prova=> select * from tmp where a like '%\\%';
a
-
(0 rows)

prova=> select * from tmp where a like '%\\\\%';
a
--
\\
(1 row)

-- how many \ do I have to use? 1, 2, 3, 4 or 5 ???

prova=> select * from tmp where a like '%\\\\\%';
a
--
\\
(1 row)
Jose'

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Meskes 1998-04-16 11:19:39 Re: [HACKERS] Re: [PATCHES] ecpg patch
Previous Message The Hermit Hacker 1998-04-16 04:47:20 Re: [HACKERS] HAVING clause and 6.3.2 release