Re: Regex bug

From: David Fetter <david(at)fetter(dot)org>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: Regex bug
Date: 2004-08-06 17:38:27
Message-ID: 20040806173827.GH27306@fetter.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Fri, Aug 06, 2004 at 01:32:32PM -0400, Tom Lane wrote:
> David Fetter <david(at)fetter(dot)org> writes:
> > Here's a symptom as reported by John Hansen aka applejack:
>
> > SELECT 'r'||'\000\125'||'hello' ~ '^.hello' AS "OMG";
>
> This is not a regex bug: it has to do with the fact that we don't
> support embedded nulls in text values. This may enlighten you
> a bit as to what's happening:
>
> regression=# select length ('\000\125');
> length
> --------
> 0
> (1 row)

Ah, right. John was testing his unicode patch, so there must be some
magick underneath that distinguishes characters from bytes :)

Cheers,
D (feeling a little sheepish. again.)
--
David Fetter david(at)fetter(dot)org http://fetter.org/
phone: +1 510 893 6100 mobile: +1 415 235 3778

Remember to vote!

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2004-08-06 17:44:06 Re: Regex bug
Previous Message Tom Lane 2004-08-06 17:32:32 Re: Regex bug