Received: from localhost (unknown [200.46.204.184]) by developer.postgresql.org (Postfix) with ESMTP id D8D3A2E005C for ; Tue, 8 Apr 2008 14:24:31 -0300 (ADT) Received: from developer.postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.184]) (amavisd-maia, port 10024) with ESMTP id 47569-01-7 for ; Tue, 8 Apr 2008 14:24:18 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from lists.commandprompt.com (host-159.commandprompt.net [207.173.203.159]) by developer.postgresql.org (Postfix) with ESMTP id ED9B62E0077 for ; Tue, 8 Apr 2008 14:24:19 -0300 (ADT) Received: from perhan.alvh.no-ip.org (200-126-91-169.bk6-dsl.surnet.cl [200.126.91.169]) (authenticated bits=0) by lists.commandprompt.com (8.13.8/8.13.8) with ESMTP id m38HOmHq000645 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 8 Apr 2008 10:24:50 -0700 Received: by perhan.alvh.no-ip.org (Postfix, from userid 1000) id C36BE47C55; Tue, 8 Apr 2008 13:24:09 -0400 (CLT) Date: Tue, 8 Apr 2008 13:24:09 -0400 From: Alvaro Herrera To: Tk421 Cc: pgsql-sql@postgresql.org Subject: Re: Pattern Matchig Message-ID: <20080408172409.GJ9062@alvh.no-ip.org> References: <47FBA7F0.3000300@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <47FBA7F0.3000300@gmail.com> User-Agent: Mutt/1.5.17+20080114 (2008-01-14) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0 (lists.commandprompt.com [207.173.203.159]); Tue, 08 Apr 2008 10:24:51 -0700 (PDT) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200804/52 X-Sequence-Number: 30591 Tk421 escribió: > The result is only record number 3. How can i search the entire > FOOBAR word? The result wanted must be all, excepting 5. Something like this: select code from table where text ~ '[[:<:]]foobar[[:>:]]' -- Alvaro Herrera http://www.CommandPrompt.com/ PostgreSQL Replication, Consulting, Custom Development, 24x7 support