Re: Rule recompilation - Mailing list pgsql-hackers

From Alex Pilosov
Subject Re: Rule recompilation
Date
Msg-id Pine.BSO.4.10.10107121427340.15496-100000@spider.pilosoft.com
Whole thread Raw
In response to Re: Rule recompilation  (Jan Wieck <JanWieck@Yahoo.com>)
List pgsql-hackers
On Thu, 12 Jul 2001, Jan Wieck wrote:

> Mikheev, Vadim wrote:
> > > > In good world rules (PL functions etc) should be automatically
> > > > marked as dirty (ie recompilation required) whenever referenced
> > > > objects are changed.
> > >
> > >     Yepp,  and  it'd  be possible for rules (just not right now).
> > >     But we're not in  a  really  good  world,  so  it'll  not  be
> > >     possible for PL's.
> >
> > Why is it possible in Oracle' world? -:)
> 
>     Because of there limited features?
> 
>     Think  about  a  language like PL/Tcl. At the time you call a
>     script for execution, you cannot even be sure  that  the  Tcl
>     bytecode  compiler parsed anything, so how will you ever know
>     the complete set of objects referenced from this function?
>     And PL/pgSQL? We don't prepare all the  statements  into  SPI
>     plans  at  compile  time. We wait until the separate branches
>     are needed, so how do you know offhand here?
If plan hasn't been made (oid has not been referenced), does it really
depend on an object?

>     In the PL/pgSQL case it *might* be possible. But is it  worth
>     it?
It'd be possible in general, as long as pl compilers properly keep track
what their objects depend on in pg_proc. (as in my above email).

-alex 



pgsql-hackers by date:

Previous
From: Alex Pilosov
Date:
Subject: Re: Rule recompilation
Next
From: "Mikheev, Vadim"
Date:
Subject: RE: Rule recompilation