Re: select a range of data

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Jessica Richard <rjessil(at)yahoo(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: select a range of data
Date: 2007-07-20 19:19:52
Message-ID: 12568.1184959192@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Jessica Richard <rjessil(at)yahoo(dot)com> 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

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Michael Monnerie 2007-07-20 20:07:10 Re: syslog: log line length?
Previous Message Jon Sime 2007-07-20 19:19:13 Re: select a range of data