Re: proposal: persistent plpgsql plugin info - field plugin_info for plpgsql_function structure - Mailing list pgsql-hackers

From Alvaro Herrera
Subject Re: proposal: persistent plpgsql plugin info - field plugin_info for plpgsql_function structure
Date
Msg-id 20131231184559.GX22570@eldon.alvh.no-ip.org
Whole thread Raw
In response to proposal: persistent plpgsql plugin info - field plugin_info for plpgsql_function structure  (Pavel Stehule <pavel.stehule@gmail.com>)
Responses Re: proposal: persistent plpgsql plugin info - field plugin_info for plpgsql_function structure
List pgsql-hackers
Pavel Stehule escribió:
> Hello
> 
> I am working on plpgsql_check and I would to write a protection against
> repeated check - so I need to mark a compiled (cached) function. Now,
> plpgsql extension can store own data to exec state, and I would to some
> similar for plpgsql_function. I believe so it can be useful for any plpgsql
> extension that collects data per signature (and recreating) means so
> refresh is necessary.

I'm not sure I understand this.  Do you want to avoid running the
checker if a previous run was seen as successful and function has not
changed?  Suppose the function depends on a table.  I invoke the check
(it succeeds), then drop the table, then invoke the check again.  What
should happen?  Conversely, if I invoke the check and it fails, then I
create the table and invoke the check again, what should happen?  How
does this idea of yours know when to invalidate the cached result of the
check when unrelated objects, which the function depends on, are
dropped/created/modified?

-- 
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services



pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: proposal: persistent plpgsql plugin info - field plugin_info for plpgsql_function structure
Next
From: Mark Dilger
Date:
Subject: Re: fix_PGSTAT_NUM_TABENTRIES_macro patch