Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 1DD5D914537 for ; Thu, 1 Dec 2011 14:05:41 -0400 (AST) Received: from gwmta.wicourts.gov ([165.219.244.99] helo=gw.wicourts.gov) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RWB0s-0000RR-TO for pgsql-bugs@postgresql.org; Thu, 01 Dec 2011 18:05:41 +0000 Received: from Courts-MTA by gw.wicourts.gov with Novell_GroupWise; Thu, 01 Dec 2011 12:05:24 -0600 Message-Id: <4ED76D7F0200002500043704@gw.wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 8.0.1 Date: Thu, 01 Dec 2011 12:05:19 -0600 From: "Kevin Grittner" To: , Subject: Re: BUG #6314: The like command does not handle a long string of special chars References: In-Reply-To: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Pg-Spam-Score: -5.4 (-----) X-Archive-Number: 201112/10 X-Sequence-Number: 31821 wrote: > Simply set a varchar field in your db to the following string: > !"#$%'()*+,-/:;=?@[\]^_`{|}~0000&<> Do you have standard_conforming_strings = on? > The like command works fine up with escapes up to: > !"#$%''()*+,-/:;=?@[% > Notice, I added the % to the end. However, if you go any further - > no matches: > !"#$%''()*+,-/:;=?@[\\% > Strangely, this works and shouldn't: > !"#$%''()*+,-/:;=?@[\% It is always better to include a self-contained test case. For example: test=# set standard_conforming_strings = on; SET test=# create table t (v text not null); CREATE TABLE test=# insert into t values ('!"#$%'()*+,-/:;=?@[\]^_`{|}~0000&<>'); INSERT 0 1 test=# select * from t where v like '!"#$\%'()*+,-/:;=?@[\\]^_`{|}~0000&<>%' escape '\'; v -------------------------------------------------------- !"#$%'()*+,-/:;=?@[\]^_`{|}~0000&<> (1 row) So this is not a bug on HEAD. What do you get when you run it? -Kevin