Re: Using regular expressions in LIKE

From: Karsten Hilbert <Karsten(dot)Hilbert(at)gmx(dot)net>
To: "'Pgsql-General(at)Postgresql(dot)Org (E-mail)'" <pgsql-general(at)postgresql(dot)org>
Subject: Re: Using regular expressions in LIKE
Date: 2004-01-15 15:44:46
Message-ID: 20040115164446.C905@hermes.hilbert.loc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

> Regexes are optimized the same way as equivalent LIKE expressions. In
> particular, the pattern has to be left-anchored to consider using it
> with an index. In LIKE that means no wildcard at the start of the
> pattern, in regex it means there has to be a ^.
What about "^.*oobar" in a regex ? I mean, it seems impossible
to use an index on that, right ?

Thanks,
Karsten
--
GPG key ID E4071346 @ wwwkeys.pgp.net
E167 67FD A291 2BEA 73BD 4537 78B9 A9F9 E407 1346

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jan Wieck 2004-01-15 15:47:56 Re: Oracle -> Postgres live translation?
Previous Message Jonathan Bartlett 2004-01-15 15:36:52 Re: serverless postgresql