pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Markus Bertheau <twanger@bluetwanger.de>
Cc: Jean-Luc Lachance <jllachan@sympatico.ca>
Cc: Keith Gallant <keith@justhosting.ca>
Cc: pgsql-sql@postgresql.org
Subject: Re: SELECT from a list
Date: Sun, 25 Jul 2004 13:34:21 -0400
Message-ID: <14659.1090776861@sss.pgh.pa.us> (raw)
In-Reply-To: <1090772515.9204.3.camel@teetnang>
References: <PDENIKIKNMLHOJKGJDLGCEPCCGAA.keith@justhosting.ca>
	<1090763779.9204.1.camel@teetnang>
	<4103C656.4070109@sympatico.ca>
	<1090772515.9204.3.camel@teetnang>

Markus Bertheau <twanger@bluetwanger.de> writes:
> В Вск, 25.07.2004, в 16:40, Jean-Luc Lachance пишет:
>> Better yet:
>> 
>> SELECT * FROM table WHERE phrase ~ '^[0-9]';

> Not so sure if that's better - the regex engines aren't the fastest.

[ raised eyebrow... ]  I was under the impression that we had a pretty
good one as of PG 7.4.  Have you tested it lately?

It is true that the above won't be indexable whereas the more tedious OR
form potentially could use an index.  This is not the fault of the regex
engine however, but of limited understanding of regexes in the planner.

			regards, tom lane



view thread (5+ messages)

Message-ID: <14659.1090776861@sss.pgh.pa.us>
Permalink:  ../14659.1090776861@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/14659.1090776861@sss.pgh.pa.us

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: tgl@sss.pgh.pa.us, twanger@bluetwanger.de, jllachan@sympatico.ca, keith@justhosting.ca
  Subject: Re: SELECT from a list
  In-Reply-To: <14659.1090776861@sss.pgh.pa.us>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox