Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gpDnK-00088w-15 for pgsql-general@arkaria.postgresql.org; Thu, 31 Jan 2019 14:58:22 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1gpDnI-00061e-Qk for pgsql-general@arkaria.postgresql.org; Thu, 31 Jan 2019 14:58:20 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gpDnI-00061X-IQ for pgsql-general@lists.postgresql.org; Thu, 31 Jan 2019 14:58:20 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1gpDnG-0001Oe-4O for pgsql-general@postgresql.org; Thu, 31 Jan 2019 14:58:20 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id x0VEwBj8002709; Thu, 31 Jan 2019 09:58:12 -0500 From: Tom Lane To: Howard News cc: Adrian Klaver , pgsql-general Subject: Re: Old tsearch functions In-reply-to: <697c10e7-867a-a56d-4ae0-4e084717d044@selestial.com> References: <077abc5d-0ffe-5a54-38b3-a36cbcaeec48@selestial.com> <010c5d24-f704-3e44-ba5a-1855ecb8e0b3@aklaver.com> <9bee7649-5b5c-d4fb-85fb-06cd28e2b3a6@selestial.com> <25915.1548871728@sss.pgh.pa.us> <697c10e7-867a-a56d-4ae0-4e084717d044@selestial.com> Comments: In-reply-to Howard News message dated "Thu, 31 Jan 2019 10:32:36 +0000" MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-ID: <2707.1548946691.1@sss.pgh.pa.us> Content-Transfer-Encoding: 8bit Date: Thu, 31 Jan 2019 09:58:11 -0500 Message-ID: <2708.1548946691@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Howard News writes: > On 30/01/2019 18:08, Tom Lane wrote: >> Note that if you had those functions laying around ever since 8.3, >> they're probably just "loose" and not wrapped into an extension at all. > unfortunately running > create extension tsearch2 from unpackaged; > caused the following error: > ERROR: operator family "gist_tsvector_ops" does not exist for access > method "gist" That's odd, the tsearch2 extension has certainly been stagnant since 8.3. I wonder if the set of tsearch2 objects you have is even older than that. > So I think I will have to create a script to delete the functions etc > individually unless someone has another idea. I'd try trimming down the tsearch2--unpackaged--1.0.sql script until it succeeds. (Don't assume that you've got the exact same set of objects in every DB, either ...) > For the tables that contain tsvector columns, is it OK to just run the > following, or will i need to rebuild the associated index? > ALTER TABLE public.mytable >     ALTER COLUMN fts TYPE tsvector ; The ALTER COLUMN will take care of rebuilding indexes, but just for certainty I'd suggest spelling that "TYPE pg_catalog.tsvector". regards, tom lane