Question on the use of bracket expressions in Postgres

From: Jimmy Rowe <j(dot)l(dot)rowe(at)larc(dot)nasa(dot)gov>
To: pgsql-general(at)postgresql(dot)org
Cc: j(dot)l(dot)rowe(at)larc(dot)nasa(dot)gov
Subject: Question on the use of bracket expressions in Postgres
Date: 2005-12-14 15:29:45
Message-ID: 6.1.1.1.2.20051214101929.04b44de8@pop.larc.nasa.gov
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Good morning,

I am new to Postgres and I have one question. I am trying to get the
following select command to work.

select * from catalog where file_name like 'abc%def%.200[2-5]%';
The following select keeps returning "(0 rows)".

I know that there are many rows in my database that should be returned
because I first did a
select * from catalog where file_name like 'abc%def%.200%';

I've tried escaping the [ and ] metacharacters and even the - but I got the
same results: (0 rows).

What is the correct syntax to pull out a range of data from my database?

Thanks.

Jimmy

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2005-12-14 15:30:00 Re: outdated (bad) information in pg_stat_activity
Previous Message Guido Neitzer 2005-12-14 15:13:27 Improving Availability