Re: Undocumented(?) limits on regexp functions

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Undocumented(?) limits on regexp functions
Date: 2018-08-13 23:49:11
Message-ID: 7657.1534204151@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk> writes:
> All the regexp functions blow up with "invalid memory alloc request"
> errors when the input string exceeds 256MB in length. This restriction
> does not seem to be documented anywhere that I could see.

> (Also for regexp_split* and regexp_matches, there's a limit of 64M total
> matches, which also doesn't seem to be documented anywhere).

> Should these limits:

> a) be removed

Doubt it --- we could use the "huge" request variants, maybe, but
I wonder whether the engine could run fast enough that you'd want to.

> c) have better error messages?

+1 for that, though.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nico Williams 2018-08-14 00:00:06 Re: NetBSD vs libxml2
Previous Message Andrew Gierth 2018-08-13 23:31:55 Undocumented(?) limits on regexp functions