ALTER TABLE DISABLE RULE does not work inside of a transaction

From: "Alex Hunsaker" <badalex(at)gmail(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: ALTER TABLE DISABLE RULE does not work inside of a transaction
Date: 2008-12-29 22:07:25
Message-ID: 34d269d40812291407o549c89dbvacda64f125f3c558@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Alex Hunsaker 2008-12-30 02:43:03 Re: ALTER TABLE DISABLE RULE does not work inside of a transaction
Previous Message Alvaro Herrera 2008-12-29 15:16:24 Re: PG 8.3.3 - ERROR: lock AccessShareLock on object 16385/16467/0 is already held