--On Montag, August 21, 2006 02:07:41 -0400 Alvaro Herrera
<[EMAIL PROTECTED]> wrote:
So, I'll appreciate if somebody else takes the responsability to fix the
remaining issues. I've put a lot of XXX's and some FIXME's. Some
functions are in need of some comments as well.
While working on Alvaro's suggestions to fix the code i got the opinion
that we need to reject any attempts to name a user defined rule
because this confuses the code when replacing an existing implicit
rule with its own user defined one:
[EMAIL PROTECTED]:bernd #= create or replace view v_second as select id, name,
usr from second where usr =
current_user with check option;
NOTICE: CREATE VIEW will create implicit INSERT/UPDATE/DELETE rules
[EMAIL PROTECTED]:bernd #= CREATE OR REPLACE RULE "_INSERT" AS ON INSERT TO
v_second DO INSTEAD NOTHING;
ERROR: tuple already updated by self
This is because the code tries to drop the existing implicit insert rule
and then to replace it with the new one (note the "_INSERT" caption of the
other labeled rule works as expected).
We could avoid this by using a CommandCounterIncrement() (brute force
but it seems to me that we should do the same here as with "_RETURN" rules
at the moment.
---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend