]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
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)
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

index e68d43227d7b18b79ab163c683864ce625757bd2..d6d2ddeaacc74f736a120da01ed69f1150846e4b 100644 (file)
@@ -4049,11 +4049,6 @@ Parser: "pg_catalog.default"
      <para>The length of a <type>tsvector</type> (lexemes + positions) must be
      less than 1 megabyte</para>
     </listitem>
-    <listitem>
-     <!-- TODO: number of lexemes in what?  This is unclear -->
-     <para>The number of lexemes must be less than
-     2<superscript>64</superscript></para>
-    </listitem>
     <listitem>
      <para>Position values in <type>tsvector</type> must be greater than 0 and
      no more than 16,383</para>