pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Re: regex engine
3+ messages / 2 participants
[nested] [flat]

* Re: regex engine
@ 2004-07-25 19:07 Markus Bertheau <twanger@bluetwanger.de>
  2004-07-25 19:41 ` Re: regex engine Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 3+ messages in thread

From: Markus Bertheau @ 2004-07-25 19:07 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Jean-Luc Lachance <jllachan@sympatico.ca>; Keith Gallant <keith@justhosting.ca>; pgsql-sql

В Вск, 25.07.2004, в 19:34, Tom Lane пишет:
> 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?

I wasn't trying to say that pg's regex engine was particularly slow, but
that regex engines in general are slower than an exact substring search.
If I'm mistaken here, please tell. pg's regex engine does have one
shortcoming though: it doesn't know UTF-8.

-- 
Markus Bertheau <twanger@bluetwanger.de>




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: regex engine
  2004-07-25 19:07 Re: regex engine Markus Bertheau <twanger@bluetwanger.de>
@ 2004-07-25 19:41 ` Tom Lane <tgl@sss.pgh.pa.us>
  2004-07-25 21:14   ` Re: regex engine Markus Bertheau <twanger@bluetwanger.de>
  0 siblings, 1 reply; 3+ messages in thread

From: Tom Lane @ 2004-07-25 19:41 UTC (permalink / raw)
  To: Markus Bertheau <twanger@bluetwanger.de>; +Cc: Jean-Luc Lachance <jllachan@sympatico.ca>; Keith Gallant <keith@justhosting.ca>; pgsql-sql

Markus Bertheau <twanger@bluetwanger.de> writes:
> pg's regex engine does have one
> shortcoming though: it doesn't know UTF-8.

Sure it does.  We borrowed it from Tcl, remember?

The "character class" stuff is not locale-aware at the moment,
which is something that ought to get fixed eventually, but claiming
it doesn't handle UTF8 at all is simply wrong.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: regex engine
  2004-07-25 19:07 Re: regex engine Markus Bertheau <twanger@bluetwanger.de>
  2004-07-25 19:41 ` Re: regex engine Tom Lane <tgl@sss.pgh.pa.us>
@ 2004-07-25 21:14   ` Markus Bertheau <twanger@bluetwanger.de>
  0 siblings, 0 replies; 3+ messages in thread

From: Markus Bertheau @ 2004-07-25 21:14 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: Jean-Luc Lachance <jllachan@sympatico.ca>; Keith Gallant <keith@justhosting.ca>; pgsql-sql

В Вск, 25.07.2004, в 21:41, Tom Lane пишет:
> Markus Bertheau <twanger@bluetwanger.de> writes:
> > pg's regex engine does have one
> > shortcoming though: it doesn't know UTF-8.
> 
> Sure it does.  We borrowed it from Tcl, remember?
> 
> The "character class" stuff is not locale-aware at the moment,
> which is something that ought to get fixed eventually, but claiming
> it doesn't handle UTF8 at all is simply wrong.

Turns out I tested in a SQL_ASCII database. Sorry :)

-- 
Markus Bertheau <twanger@bluetwanger.de>




^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2004-07-25 21:14 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-07-25 19:07 Re: regex engine Markus Bertheau <twanger@bluetwanger.de>
2004-07-25 19:41 ` Tom Lane <tgl@sss.pgh.pa.us>
2004-07-25 21:14   ` Markus Bertheau <twanger@bluetwanger.de>

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