Re: Find out what on what function depends an index

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andreas Ulbrich <andreas(dot)ulbrich(at)matheversum(dot)de>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Find out what on what function depends an index
Date: 2015-06-01 14:15:55
Message-ID: 17101.1433168155@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Andreas Ulbrich <andreas(dot)ulbrich(at)matheversum(dot)de> writes:
> The question is the todo in the script: Is there a way to find out what
> indexes depends on what function?

Direct dependencies would show up in pg_depend. Indirect ones wouldn't,
since we don't analyze function bodies to see what they call (and if we
tried, there's the little matter of the halting problem).

A larger problem is that frequently the real issue with an unstable index
expression definition is that it depends on context, such as GUC settings,
rather than the function body per se. So I'm not sure how much pain you'd
really be able to prevent with this approach.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Stern 2015-06-01 14:35:12 Database designpattern - product feature
Previous Message Andreas Ulbrich 2015-06-01 14:06:54 Find out what on what function depends an index