Received: from localhost (maia-2.hub.org [200.46.204.187]) by postgresql.org (Postfix) with ESMTP id 393B39FC0F0 for ; Fri, 20 Jul 2007 16:19:59 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.187]) (amavisd-maia, port 10024) with ESMTP id 29534-01 for ; Fri, 20 Jul 2007 16:19:51 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.5 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by postgresql.org (Postfix) with ESMTP id C82999FC0D5 for ; Fri, 20 Jul 2007 16:19:53 -0300 (ADT) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.1/8.14.1) with ESMTP id l6KJJqlA012569; Fri, 20 Jul 2007 15:19:52 -0400 (EDT) To: Jessica Richard cc: pgsql-admin@postgresql.org Subject: Re: select a range of data In-reply-to: <497741.11791.qm@web56410.mail.re3.yahoo.com> References: <497741.11791.qm@web56410.mail.re3.yahoo.com> Comments: In-reply-to Jessica Richard message dated "Fri, 20 Jul 2007 12:00:18 -0700" Date: Fri, 20 Jul 2007 15:19:52 -0400 Message-ID: <12568.1184959192@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200707/235 X-Sequence-Number: 26216 Jessica Richard writes: > how do I select col from table where col like 'a[a-z]c24[0-9]7"? > How do I handle the range bracket in the query? Using LIKE, you don't. However there are two other types of pattern-matching operators that do understand character classes: http://www.postgresql.org/docs/8.2/static/functions-matching.html regards, tom lane