Re: [9.2] crash on regex - Mailing list pgsql-hackers

From Robert Haas
Subject Re: [9.2] crash on regex
Date
Msg-id CA+TgmoYywip=p_bJZbN_0uYkU0vXbNiBEBNBaZeKpDPoPbJOXA@mail.gmail.com
Whole thread Raw
In response to [9.2] crash on regex  (Marko Kreen <markokr@gmail.com>)
Responses Re: [9.2] crash on regex
Re: [9.2] crash on regex
List pgsql-hackers
On Thu, May 24, 2012 at 10:16 AM, Marko Kreen <markokr@gmail.com> wrote:
> Following query crashes backend on 9.2:
>
>  select substring('asd TO foo' from ' TO (([a-z0-9._]+|"([^"]+|"")+")+)');

I spent some time trying to reduce this to the simplest case that
still causes a crash, and came up with this:

select substring('a' from '((a))+');

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pg_stat_statments queryid
Next
From: Robert Haas
Date:
Subject: Re: "could not open relation with OID" errors after promoting the standby to master