Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

ALTER TABLE DISABLE RULE does not work inside of a transaction



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



Home | Main Index | Thread Index

Privacy Policy | About PostgreSQL
Copyright © 1996 – 2012 PostgreSQL Global Development Group