Received: from localhost (maia-1.hub.org [200.46.204.191]) by postgresql.org (Postfix) with ESMTP id 596289FBBED for ; Sat, 21 Apr 2007 13:03:57 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.191]) (amavisd-maia, port 10024) with ESMTP id 16088-04-4 for ; Sat, 21 Apr 2007 13:03:53 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from smtpout.mac.com (smtpout.mac.com [17.250.248.171]) by postgresql.org (Postfix) with ESMTP id 48ED39FBBF0 for ; Sat, 21 Apr 2007 13:03:14 -0300 (ADT) Received: from mac.com (smtpin02-en2 [10.13.10.147]) by smtpout.mac.com (Xserve/smtpout01/MantshX 4.0) with ESMTP id l3LG3DFG002555 for ; Sat, 21 Apr 2007 09:03:13 -0700 (PDT) Received: from [192.168.16.46] (pool-72-88-250-47.nwrknj.east.verizon.net [72.88.250.47]) (authenticated bits=0) by mac.com (Xserve/smtpin02/MantshX 4.0) with ESMTP id l3LG3B2d029548 for ; Sat, 21 Apr 2007 09:03:12 -0700 (PDT) Mime-Version: 1.0 (Apple Message framework v752.2) Content-Transfer-Encoding: 7bit Message-Id: <6E4919C6-83F7-4E30-A509-4AB59A4ED6C2@mac.com> Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed To: pgsql-sql@postgresql.org From: Richard Doust Subject: Regular Expression Data Type Date: Sat, 21 Apr 2007 12:03:18 -0400 X-Mailer: Apple Mail (2.752.2) X-Brightmail-Tracker: AAAAAA== X-Brightmail-scanned: yes X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200704/207 X-Sequence-Number: 28207 Hi. I appreciate that I can query the database and find records that match a regular expression. What I'd like to be able to do is to define a field in the database as a regular expression so that when I select, i.e., select price from shipping_prices where shipFromZip = '23773' and shipToZip ~ '87927' because shipToZip is defined as a regular expression, I'd match a row where shipToZip held the value '879[0-9]{2,2}' or '87[0-9]*'. Wouldn't that be cool? Does anyone know whether this is already possible? Thanks.