Received: from localhost (unknown [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 37E1264FCEC for ; Mon, 8 Sep 2008 03:45:38 -0300 (ADT) Received: from postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 55628-09 for ; Mon, 8 Sep 2008 03:45:28 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.191]) by postgresql.org (Postfix) with ESMTP id A0C3364FCCA for ; Mon, 8 Sep 2008 03:45:22 -0300 (ADT) Received: by nf-out-0910.google.com with SMTP id c7so343632nfi.23 for ; Sun, 07 Sep 2008 23:45:21 -0700 (PDT) Received: by 10.210.115.15 with SMTP id n15mr18308415ebc.28.1220856321080; Sun, 07 Sep 2008 23:45:21 -0700 (PDT) Received: from ?80.222.42.69? ( [80.222.42.69]) by mx.google.com with ESMTPS id 32sm3149402nfu.10.2008.09.07.23.45.19 (version=TLSv1/SSLv3 cipher=RC4-MD5); Sun, 07 Sep 2008 23:45:20 -0700 (PDT) Message-ID: <48C4C9FE.20905@enterprisedb.com> Date: Mon, 08 Sep 2008 09:45:18 +0300 Organization: EnterpriseDB User-Agent: Mozilla-Thunderbird 2.0.0.14 (X11/20080509) MIME-Version: 1.0 To: Tom Lane CC: David Rowley , 'Peter Eisentraut' , pgsql-patches@postgresql.org Subject: Re: [HACKERS] TODO item: Implement Boyer-Moore searching (First time hacker) References: <2F2A1443F6064162BECA6BB37625222E@amd64> <27136.1220634737@sss.pgh.pa.us> <48C16BA4.2060407@enterprisedb.com> <27645.1220635769@sss.pgh.pa.us> In-Reply-To: <27645.1220635769@sss.pgh.pa.us> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit From: Heikki Linnakangas X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200809/89 X-Sequence-Number: 7104 Tom Lane wrote: > Heikki Linnakangas writes: >> Also, it would be nice to use B-M(-H) for LIKE as well. > > Right offhand, that seems impossible, at least in patterns with %. > Or were you thinking of trying to separate out the fixed substrings > of a pattern and search for them with BMH? Yep, something like that. Even if it only handled the special case of '%foobar%', that would be nice, because that's a pretty common special case. > Anyway, it's not material for this patch, since it'd involve pretty > fundamental redesign of the LIKE code. Yep. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com