]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Doc: remove bogus claim that tsvectors can have up to 2^64 entries.
authorTom Lane <tgl@sss.pgh.pa.us>
Tue, 31 Mar 2026 15:49:54 +0000 (11:49 -0400)
committerTom Lane <tgl@sss.pgh.pa.us>
Tue, 31 Mar 2026 15:49:54 +0000 (11:49 -0400)
commit960382e3e991f774d0ef92eb82dd7ef641f74108
tree4c8b8fa1e8b6ed23d9c692188d7ed9cab48b975a
parentfb7a9050d53c5cd4b7c86f8e07196bd47b9db3b2
Doc: remove bogus claim that tsvectors can have up to 2^64 entries.

This is nonsense on its face, since the textsearch parsing logic
generally uses int32 to count words (see, eg, struct ParsedText).
Not to mention that we don't support input strings larger than
1GB.

The actual limitation of interest is documented nearby: a tsvector
can't be larger than 1MB, thanks to 20-bit offset fields within it
(see WordEntry.pos).  That constrains us to well under 256K lexemes
per tsvector, depending on how many positions are stored per lexeme.

It seems sufficient therefore to just remove the bit about number
of lexemes.

Author: Dharin Shah <dharinshah95@gmail.com>
Discussion: https://postgr.es/m/CAOj6k6d0YO6AO-bhxkfUXPxUi-+YX9-doh2h5D5z0Bm8D2w=OA@mail.gmail.com
doc/src/sgml/textsearch.sgml