Re: - Mailing list pgsql-bugs

From Michael Paquier
Subject Re:
Date
Msg-id 20200602013210.GA3346@paquier.xyz
Whole thread Raw
In response to Re[4]:  (Andrey Klychkov <aaklychkov@mail.ru>)
List pgsql-bugs
On Mon, Jun 01, 2020 at 05:39:05PM +0300, Andrey Klychkov wrote:
> I’ve seen on the internet people ask each other about this (when i
> was searching the same not seeing that in the documentation).

Note that indexes and tables can be schema-qualified in a REINDEX
query, so you would need a bit more than the query above, still you
could just wrap that in a plpgsql function that scans pg_class and
pg_index, and issues a set of DROP INDEX commands on each entry.  I
have been wondering as well in the past about adding a set of SQL
queries to be able to do the work in a database as if you run into
this issue repeatedly it is annoying.  So we could add that on the
reindex page close to the paragraph about the drop of invalid
indexes.
--
Michael

Attachment

pgsql-bugs by date:

Previous
From: 鄭旭宏
Date:
Subject: Re: BUG #16472: Bug in to_timestamp ?
Next
From: David Rowley
Date:
Subject: Re: pgbench bug / limitation