Re: Uninterruptable regexp_replace in 9.3.1 ? - Mailing list pgsql-hackers

From Florian Pflug
Subject Re: Uninterruptable regexp_replace in 9.3.1 ?
Date
Msg-id 6EF2A961-79C6-470B-BC2C-AA6061D07CE4@phlo.org
Whole thread Raw
In response to Re: Uninterruptable regexp_replace in 9.3.1 ?  (Craig Ringer <craig@2ndquadrant.com>)
List pgsql-hackers
On Feb21, 2014, at 17:29 , Craig Ringer <craig@2ndQuadrant.com> wrote:
> The problem report claims that the issue does not occur on 9.1, but yet:
>
> git diff REL9_1_STABLE master  -- ./src/backend/utils/adt/regexp.c
>
> is utterly trivial; a copyright date line change, and 1609797c which
> just tweaks the includes. 9.0 has a much bigger diff.

On 9.1.12:

postgres=# select regexp_matches('              $a$b$c$d$e$f$g$h$i$j$',
$REG$((?:[^'"$;]+|"[^"]*"|'(?:[^']*|'')*'|(\$[^$]*\$).*\2)+)$REG$, 'g');              regexp_matches
---------------------------------------------{"              $a$b$c$d$e$f$g$h$i$j",NULL}
(1 row)
Time: 1.048 ms

On HEAD

postgres=# select regexp_matches('              $a$b$c$d$e$f$g$h$i$j$',
$REG$((?:[^'"$;]+|"[^"]*"|'(?:[^']*|'')*'|(\$[^$]*\$).*\2)+)$REG$, 'g');    regexp_matches
-------------------------{"
",NULL}{a,NULL}{b,NULL}{c,NULL}{d,NULL}{e,NULL}{f,NULL}{g,NULL}{h,NULL}{i,NULL}{j,NULL}
(11 rows)
Time: 4787.239 ms

Aha! Since we go rid of regex_flavor pre-9.1, I don't have an immediate suspect...

best regards,
Florian Pflug




pgsql-hackers by date:

Previous
From: Craig Ringer
Date:
Subject: Re: Storing the password in .pgpass file in an encrypted format
Next
From: Tom Lane
Date:
Subject: Re: Uninterruptable regexp_replace in 9.3.1 ?