Re: Assert triggered during RE_compile_and_cache
От | Mark Dilger |
---|---|
Тема | Re: Assert triggered during RE_compile_and_cache |
Дата | |
Msg-id | AB203EEC-6EB0-49BC-9585-736C40104895@enterprisedb.com обсуждение исходный текст |
Ответ на | Re: Assert triggered during RE_compile_and_cache (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: Assert triggered during RE_compile_and_cache
Re: Assert triggered during RE_compile_and_cache |
Список | pgsql-hackers |
> On Aug 7, 2021, at 6:03 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote: > > That requires tweaking the API of parseqatom, > which why I'd not done it like that to begin with --- but that's not > a hard or complicated change, just a mite tedious. > > Hence, the attached patch. Applying your <alternate-backref-corner-case-fix-1.patch> to master changes the outcome of some regular expression queries,but I *think* it changes them for the better. These three look to me exactly correct after the patch, and wrong before: select regexp_matches('vnrungnajjjgkaaeaper', '((.))(((\1)))((?:\5..))', 'mx'); - regexp_matches ----------------- -(0 rows) + regexp_matches +----------------- + {j,j,j,j,j,jgk} +(1 row) select regexp_match('kgkgeganlifykxhfspjtgluwluwluwdfdfbbdjvrxjvrxedndrkaxxvbtqdj', '((.))\2'); regexp_match -------------- - + {b,b} (1 row) select regexp_split_to_array('uuuzkodphfbfbfb', '((.))(\1\2)', 'ntw'); regexp_split_to_array ----------------------- - {uuuzkodphfbfbfb} + {"",zkodphfbfbfb} (1 row) But these next two look to me correct before the patch and wrong after: select regexp_matches('ircecpbgyiggvtruqgxzigxzigxzisdbkuhbkuhrvl', '(((.)))(?:(\3))[^\f]'); regexp_matches ---------------- -(0 rows) + {g,g,g,g} +(1 row) select regexp_matches('fhgxnvbvjaej', '(((.)).)((\3)((.)))', 'csx'); - regexp_matches ----------------- -(0 rows) + regexp_matches +------------------- + {vb,v,v,vj,v,j,j} +(1 row) — Mark Dilger EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
В списке pgsql-hackers по дате отправления: