Re: indexes on functions and create or replace function - Mailing list pgsql-general

From Matthew Dennis
Subject Re: indexes on functions and create or replace function
Date
Msg-id e94d85500808281937m4f42cd6fh862b239bb1d7ac64@mail.gmail.com
Whole thread Raw
In response to Re: indexes on functions and create or replace function  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-general
On Thu, Aug 28, 2008 at 8:51 PM, Alvaro Herrera <alvherre@commandprompt.com> wrote:
There's no way at all in the general case (a function name could be
passed as a parameter, for example).  I think Matthew is suggesting to
track dependencies at run time, but that seems a recipe for burnt
fingers and an overall performance loss, for what seems a dubious gain.

I wouldn't think that it would be that much of a performance loss (except for DDL type things where you were setting up the dependency in the first place) though you would certainly know better than me.  In any case, I know it would be a lot of work and I wasn't suggesting doing it all at once, but rather as a rule of thumb going forward - a continuous improvement to be made as other work is done.  If people in a better position than I to gage this really think performance would suffer a great deal or that it's not doable (or shouldn't be done), I respect that.  It seems that we should at least give warnings where we can though and probably doc it somewhere.  "hey user, you replaced a plpgsql function that was used in an index, your index may now be invalid.  Please see deatils at xyz".

pgsql-general by date:

Previous
From: Christophe
Date:
Subject: Re: indexes on functions and create or replace function
Next
From: Alvaro Herrera
Date:
Subject: Re: indexes on functions and create or replace function