Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r8PTF-009isl-D1 for pgsql-docs@arkaria.postgresql.org; Wed, 29 Nov 2023 18:39:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1r8PTD-00CPx7-UA for pgsql-docs@arkaria.postgresql.org; Wed, 29 Nov 2023 18:39:35 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r8PTD-00CPwy-4T for pgsql-docs@lists.postgresql.org; Wed, 29 Nov 2023 18:39:35 +0000 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1r8PTA-007ynn-3h for pgsql-docs@lists.postgresql.org; Wed, 29 Nov 2023 18:39:33 +0000 Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 3293B3200B68 for ; Wed, 29 Nov 2023 13:39:30 -0500 (EST) Received: from imap49 ([10.202.2.99]) by compute2.internal (MEProxy); Wed, 29 Nov 2023 13:39:30 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eulerto.com; h= cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm2; t=1701283169; x=1701369569; bh=V9 Tag5+7xRZK90vVh44Nah+SKwHV/af/Dz1teVfG2bM=; b=Kb1CSQZh7JMelY/OqE h4RBr4UNDx1Z1pTQsNs51Uxv+YyBJnR6sHTQ8SyEsd8zTjBrCArdh94u78qcHulK 65xfdLj5UTXR2M+KXy3a5Vh2UkwH/SKANKe2pWegKbMxXrITtFTT691is5Muprxo QsEOYV8AEyn2wAMNYllFp7vzAnU5mYfLcVP/D5hyc5Efwf6KddyI79Nz7/b54iXt j6gx3atkUXAQ+teURRdMoiUAG6wU2Isw/uCptwISlHKlkKOO1/9YGeah48Hn8TY9 NiYYNkSGniM8WBbNA7GzFWRE3Guj02abOPmEn9RaHYvofY5Fm1d9CDM0SkQ8qBVI dZUQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1701283169; x=1701369569; bh=V9Tag5+7xRZK9 0vVh44Nah+SKwHV/af/Dz1teVfG2bM=; b=mW1CdS+JhaSQhNerGr/KSbJ4HzchT 6fhyFr3mWx3h2HMGH104nlkISJWh/Vu3rr/rrhnxIb8knqa1LYyxwUmhjZZnm9ue csAog1ioEcDZiF44Sik0sj8ATKRMSvJHP40niy22ixbABb4Mf3079z/ZwvcVwXaP VoWcw8cwAqoWFwqkgJZui3Eshrxli3B45Fkqej2We5GupdmJ0BiXyakRofUeCYqO fwbxTUraeSwXcrfAjFpDEKXBPC+7fVBBgtXG6ERd7iMCdv3KJdTab7L61sUUkzPT tmJXYpOzTesDMK4Zxq2qQprcCT4Af7QaD5SIlx8ymiIZ/8RkeGAsA/Y5Q== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvkedrudeihedguddufecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecunecujfgurhepofgfggfkjghffffhvffutgesrg dtreerreertdenucfhrhhomhepfdfguhhlvghrucfvrghvvghirhgrfdcuoegvuhhlvghr segvuhhlvghrthhordgtohhmqeenucggtffrrghtthgvrhhnpedtjeffieeuieeggeehie eutdevleetteejiedtgfehheefueekvefftedujefhffenucffohhmrghinhepphhoshht ghhrvghsqhhlrdhorhhgpdgvnhhtvghrphhrihhsvggusgdrtghomhenucevlhhushhtvg hrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpegvuhhlvghrsegvuhhlvghr thhordgtohhm X-ME-Proxy: Feedback-ID: i0c21471d:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 4BD5315A0091; Wed, 29 Nov 2023 13:39:29 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-1234-gac66594aae-fm-20231122.001-gac66594a MIME-Version: 1.0 Message-Id: <3e2a2d49-1241-4c48-90df-63f11d4bd45c@app.fastmail.com> In-Reply-To: References: Date: Wed, 29 Nov 2023 15:39:07 -0300 From: "Euler Taveira" To: pgsql-docs@lists.postgresql.org Subject: Re: An inconsistency in the documentation about full text search Content-Type: multipart/alternative; boundary=2f36e3d0621d4bdebc57287e9018c24b List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --2f36e3d0621d4bdebc57287e9018c24b Content-Type: text/plain On Tue, Nov 7, 2023, at 7:12 AM, Erki Eessaar wrote: > Section > > 12.2.2. Creating Indexes > https://www.postgresql.org/docs/current/textsearch-tables.html#TEXTSEARCH-TABLES-INDEX > > wrtites the following: "Another approach is to create a separate tsvector column to hold the output of to_tsvector. To keep this column automatically up to date with its source data, use a stored generated column. This example is a concatenation of title and body, using coalesce to ensure that one field will still be indexed when the other is NULL" > > Section > > 12.4.3. Triggers for Automatic Updates > https://www.postgresql.org/docs/current/textsearch-features.html#TEXTSEARCH-UPDATE-TRIGGERS This section has a note at the top that this trigger-based method is obsolete and refers to section 12.2.2 (Creating Indexes). -- Euler Taveira EDB https://www.enterprisedb.com/ --2f36e3d0621d4bdebc57287e9018c24b Content-Type: text/html
On Tue, Nov 7, 2023, at 7:12 AM, Erki Eessaar wrote:
Section

12.2.2. Creating Indexes
https://www.postgresql.org/docs/current/textsearch-tables.html#TEXTSEARCH-TABLES-INDEX

wrtites the following: "Another approach is to create a separate tsvector column to hold the output of to_tsvector. To keep this column automatically up to date with its source data, use a stored generated column. This example is a concatenation of title and body, using coalesce to ensure that one field will still be indexed when the other is NULL"

Section

12.4.3. Triggers for Automatic Updates
https://www.postgresql.org/docs/current/textsearch-features.html#TEXTSEARCH-UPDATE-TRIGGERS

This section has a note at the top that this trigger-based method is obsolete
and refers to section 12.2.2 (Creating Indexes).


--
Euler Taveira

--2f36e3d0621d4bdebc57287e9018c24b--