Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cW5QS-0008Q6-35 for pgsql-bugs@arkaria.postgresql.org; Tue, 24 Jan 2017 18:02:36 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cW5QR-0003UH-Hj for pgsql-bugs@arkaria.postgresql.org; Tue, 24 Jan 2017 18:02:35 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cW5QR-0003U4-5T for pgsql-bugs@postgresql.org; Tue, 24 Jan 2017 18:02:35 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cW5QO-0006ZW-60 for pgsql-bugs@postgresql.org; Tue, 24 Jan 2017 18:02:34 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id v0OI2P2H023479; Tue, 24 Jan 2017 13:02:25 -0500 From: Tom Lane To: vojta.rylko@gmail.com cc: pgsql-bugs@postgresql.org Subject: Re: BUG #14512: Backslashes in LIKE In-reply-to: <20170124172505.1431.56735@wrigleys.postgresql.org> References: <20170124172505.1431.56735@wrigleys.postgresql.org> Comments: In-reply-to vojta.rylko@gmail.com message dated "Tue, 24 Jan 2017 17:25:05 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <23477.1485280945.1@sss.pgh.pa.us> Date: Tue, 24 Jan 2017 13:02:25 -0500 Message-ID: <23478.1485280945@sss.pgh.pa.us> X-Pg-Spam-Score: -5.1 (-----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-bugs Precedence: bulk Sender: pgsql-bugs-owner@postgresql.org 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