From 960382e3e991f774d0ef92eb82dd7ef641f74108 Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Tue, 31 Mar 2026 11:49:54 -0400 Subject: [PATCH] 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 Discussion: https://postgr.es/m/CAOj6k6d0YO6AO-bhxkfUXPxUi-+YX9-doh2h5D5z0Bm8D2w=OA@mail.gmail.com --- doc/src/sgml/textsearch.sgml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/doc/src/sgml/textsearch.sgml b/doc/src/sgml/textsearch.sgml index e68d43227d7..d6d2ddeaacc 100644 --- a/doc/src/sgml/textsearch.sgml +++ b/doc/src/sgml/textsearch.sgml @@ -4049,11 +4049,6 @@ Parser: "pg_catalog.default" The length of a tsvector (lexemes + positions) must be less than 1 megabyte - - - The number of lexemes must be less than - 264 - Position values in tsvector must be greater than 0 and no more than 16,383