ALTER TABLE DISABLE RULE does not work inside of a transaction - Mailing list pgsql-bugs

From Alex Hunsaker
Subject ALTER TABLE DISABLE RULE does not work inside of a transaction
Date
Msg-id 34d269d40812291407o549c89dbvacda64f125f3c558@mail.gmail.com
Whole thread Raw
Responses Re: ALTER TABLE DISABLE RULE does not work inside of a transaction  ("Alex Hunsaker" <badalex@gmail.com>)
Re: ALTER TABLE DISABLE RULE does not work inside of a transaction  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
Namely it does not disable the rule... Enabling inside of the
transaction seems to work though

Tried both CVS and 8.3.5...

create table trule (a int);
insert into trule (a) values (1);
create rule trule_rule as on update to trule do instead nothing;

update trule set a = 2;
UPDATE 0

begin;
ALTER TABLE trule DISABLE RULE trule_rule;
update trule set a = 2;
UPDATE 0

\d trule
   Table "public.trule"
 Column |  Type   | Modifiers
--------+---------+-----------
 a      | integer |
Disabled rules:
    trule_rule AS
    ON UPDATE TO trule DO INSTEAD NOTHING

rollback;

ALTER TABLE trule DISABLE RULE trule_rule;
update trule set a = 2;
UPDATE 1

pgsql-bugs by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: PG 8.3.3 - ERROR: lock AccessShareLock on object 16385/16467/0 is already held
Next
From: "Alex Hunsaker"
Date:
Subject: Re: ALTER TABLE DISABLE RULE does not work inside of a transaction