Re: [BUGS] BUG #14512: Backslashes in LIKE - Mailing list pgsql-bugs

From Tom Lane
Subject Re: [BUGS] BUG #14512: Backslashes in LIKE
Date
Msg-id 23478.1485280945@sss.pgh.pa.us
Whole thread Raw
In response to [BUGS] BUG #14512: Backslashes in LIKE  (vojta.rylko@gmail.com)
Responses Re: [BUGS] BUG #14512: Backslashes in LIKE
List pgsql-bugs
vojta.rylko@gmail.com writes:
> Hi, LIKE behaves differently depending on left side.

>> select 1 where '\' like '\\\'; -- one and three backslashes
>  ?column? 
> ----------
> (0 rows)

>> select 1 where '\\' like '\\\'; -- two and three backslashes
> ERROR:  LIKE pattern must not end with escape character

I see no bug here.  The pattern is wrong, but it happens not to notice in
the first case because it never reaches the buggy part of the pattern.

            regards, tom lane


-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

pgsql-bugs by date:

Previous
From: "David G. Johnston"
Date:
Subject: Re: [BUGS] BUG #14512: Backslashes in LIKE
Next
From: "David G. Johnston"
Date:
Subject: Re: [BUGS] BUG #14512: Backslashes in LIKE