Rule recompilation - Mailing list pgsql-hackers

From Jan Wieck
Subject Rule recompilation
Date
Msg-id 200107121728.f6CHSxr04560@jupiter.us.greatbridge.com
Whole thread Raw
Responses Re: Rule recompilation
Re: Rule recompilation
List pgsql-hackers
Hi,
   I'd  like  to  add  another column to pg_rewrite, holding the   string representation of the  rewrite  rule.  A  new
utility   command  will  then  allow  to recreate the rules (internally   DROP/CREATE, but that doesn't matter).
 
   This would be a big help in case anything used in a  view  or   other  rules  get's  dropped  and  recreated (like
underlying  tables). There is of course a difference between the original   CREATE  RULE/VIEW  statement and the string
storedhere. This   is because we cannot rely on the actual query buffer but have   to parseback the parsetree like done
bythe utility functions   used for pg_rules. Thus, changing a column  name  of  a  base   table will break the view
eitherway.
 
   Anyway,  what's  the preferred syntax for triggering the rule   recompilation?  I thought about
       ALTER RULE {rulename|ALL} RECOMPILE;
   Where ALL triggers only those rules where the  user  actually   has RULE access right on a relation.


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



pgsql-hackers by date:

Previous
From: "Mikheev, Vadim"
Date:
Subject: RE: Re: Strangeness in xid allocation / snapshot setup
Next
From: Tom Lane
Date:
Subject: Re: Re: Strangeness in xid allocation / snapshot setup