From: | Jan Wieck <JanWieck(at)Yahoo(dot)com> |
---|---|
To: | PostgreSQL HACKERS <pgsql-hackers(at)postgreSQL(dot)org> |
Subject: | Rule recompilation |
Date: | 2001-07-12 17:28:59 |
Message-ID: | 200107121728.f6CHSxr04560@jupiter.us.greatbridge.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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 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. #
#================================================== JanWieck(at)Yahoo(dot)com #
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com
From | Date | Subject | |
---|---|---|---|
Next Message | Mikheev, Vadim | 2001-07-12 17:36:30 | RE: Re: Strangeness in xid allocation / snapshot setup |
Previous Message | Tom Lane | 2001-07-12 17:28:21 | Re: Prefixing libpq error message with function names |