Question on the use of bracket expressions in Postgres - Mailing list pgsql-general

From Jimmy Rowe
Subject Question on the use of bracket expressions in Postgres
Date
Msg-id 6.1.1.1.2.20051214101929.04b44de8@pop.larc.nasa.gov
Whole thread Raw
Responses Re: Question on the use of bracket expressions in Postgres
List 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


pgsql-general by date:

Previous
From: Jerry LeVan
Date:
Subject: Re: Installing the latest 8.1.1 rpms question.
Next
From: Michael Glaesemann
Date:
Subject: Re: Question on the use of bracket expressions in Postgres