Find out what on what function depends an index

From: Andreas Ulbrich <andreas(dot)ulbrich(at)matheversum(dot)de>
To: pgsql-general(at)postgresql(dot)org
Subject: Find out what on what function depends an index
Date: 2015-06-01 14:06:54
Message-ID: 556C66FE.5040605@matheversum.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Salvete.

If I have an expression based index (a fucntion call) then the index
will become corrupt, if the function is changed. As the function
developer, I do not know, who uses the function for an index, and as the
user of the function in an index I do not know if the function is
changed. So the idea is: Have an event trigger ON ddl_command_end to do
a REINDEX; see the attached example.

The question is the todo in the script: Is there a way to find out what
indexes depends on what function?

thanks
Andreas

Attachment Content-Type Size
t_reindexfn.sql text/x-sql 1.9 KB

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2015-06-01 14:15:55 Re: Find out what on what function depends an index
Previous Message Maxim Boguk 2015-06-01 14:04:46 Re: Curious case of huge simple btree indexes bloat.