Mathijs Brands wrote:
> On Sat, Mar 24, 2001 at 11:36:56PM -0500, Tom Lane allegedly wrote:
> > Mathijs Brands <mathijs@ilse.nl> writes:
> > > How about being able to recompile them (keeping the SQL around in the
> > > system catalogs)? Doesn't Oracle allow you to do something like that?
> >
> > That's another possibility. It's not real clear that there's any
> > advantage to storing rules in preparsed form to begin with --- if
> > we just stored the original text and reparsed it each time it was
> > read, the system would be vastly more flexible, and probably not
> > noticeably slower.
>
> But every bit of performance counts, of course...
The question is if parsing the original query is that more expensive than converting the printed node tree
back into it's binary representation, what's done now. And then again, this is only done when the relation is
opened and it's RelationData not found in the relcache. If the relcache serves well, this happens once per
connection.
OTOH, due to toast we don't need to save space in the pg_rewrite tuples any more. Adding two new
attributesto hold just the backparsed rule qualification and actions (backparsed from the nodes like
donefor pg_dump), it might be easy to create a utility that recompiles rules - for one or all relations.
Jan
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck@Yahoo.com #
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com