Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ef3xW-0007ng-9X for pgsql-docs@arkaria.postgresql.org; Fri, 26 Jan 2018 13:22:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ef3xV-0003nO-FM for pgsql-docs@arkaria.postgresql.org; Fri, 26 Jan 2018 13:22:21 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1ef3xV-0003nE-6O for pgsql-docs@lists.postgresql.org; Fri, 26 Jan 2018 13:22:21 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ef3xO-0008Bo-4T for pgsql-docs@postgresql.org; Fri, 26 Jan 2018 13:22:19 +0000 Received: from bruce by momjian.us with local (Exim 4.84_2) (envelope-from ) id 1ef3xN-0003Fv-98; Fri, 26 Jan 2018 08:22:13 -0500 Date: Fri, 26 Jan 2018 08:22:13 -0500 From: Bruce Momjian To: GPT Cc: pgsql-docs@postgresql.org Subject: Re: Addition to / Clarification in 9.7.1. LIKE Message-ID: <20180126132213.GF20836@momjian.us> References: <20171214093339.29863.34708@wrigleys.postgresql.org> <20180125225523.GB22736@momjian.us> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk On Fri, Jan 26, 2018 at 09:52:07AM +0100, GPT wrote: > Between 1st (The LIKE expression...) and 2nd (If pattern does not...) > paragraphs, it could be added something like: > > > Caution > Contrary to some other databases, in Postgresql only two characters > are used in LIKE patterns: underscore (_) and percent sign (%). > The use of any other character will lead to an error. > > > The error message also would be more clarified to inform user about > the use of not supported characters. Uh, I still don't understand what error you are talking about. Here are some examples: SELECT 'abc' LIKE 'a_c'; ?column? ---------- t SELECT 'abc' LIKE 'a%c'; ?column? ---------- t SELECT 'abc' LIKE 'a%*c'; ?column? ---------- f Can you show me an example? -- Bruce Momjian http://momjian.us EnterpriseDB http://enterprisedb.com + As you are, so once was I. As I am, so you will be. + + Ancient Roman grave inscription +