Subject: [PATCH][DOC][MINOR] Fix incorrect lexeme limit in textsearch docs

From: Dharin Shah <[email-masked]>
Date: Sat, 27 Dec 2025 22:09:14 +0100

Hello,

A minor doc patch for this page
https://www.postgresql.org/docs/current/textsearch-limitations.html
and this line

*- The number of lexemes must be less than 2^64*

Docs wrongly claim "lexemes must be < 2^64" but the actual constraint is
1 MB total storage (MAXSTRPOS), and no 2^64 check exists in the code.

---

From: Dharin Shah <[email-masked]>
Date: Thu, 26 Mar 2026 23:48:18 +0100

Sorry to drop the ball on this, will get back to cleaning it up and create
a new patch

Thanks,
Dharin

On Thu, Mar 26, 2026 at 11:02 PM Tom Lane <[email-masked]> wrote:

> Aditya Gollamudi <[email-masked]> writes:
> >  +1 on this patch, I was also a bit confused on this part of the
> > documentation. All I could conclude was that the number of lexemes in a
> > tsvector was limited by existing tsvector limits. I agree with Surya's
> > comment about the overlap, I think this patch should only remove the line
> > about the 2^64 bound. Patch applies cleanly!
>
> What I'm inclined to do is just drop that <listitem> entirely,
> since it's implied by the 1MB space limit.  The patch as-submitted
> accomplishes about the same thing, but takes more words to do it.
>
>                         regards, tom lane
>