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 stored here. This
    is because we cannot rely on the actual query buffer but have
    to parseback the parsetree like done by the utility functions
    used for pg_rules. Thus, changing a column  name  of  a  base
    table will break the view either way.

    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.                                  #
#================================================== [EMAIL PROTECTED] #



_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
    (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])

Reply via email to