Re: feature request for Postgresql Rule system. - Mailing list pgsql-general

From Richard Broersma Jr
Subject Re: feature request for Postgresql Rule system.
Date
Msg-id 686494.20594.qm@web31807.mail.mud.yahoo.com
Whole thread Raw
In response to Re: feature request for Postgresql Rule system.  (Jeff Davis <pgsql@j-davis.com>)
Responses Re: feature request for Postgresql Rule system.
Re: feature request for Postgresql Rule system.
List pgsql-general
> > Would there be any interest in making rules with multiple sql statements acid compliant?
> They are.

Am I missing something then, becuase I have cases where it is possible to get partial updates from
the multi-sql statement rule?  I suppose that my understanding of "ACID" actually mean may not be
correct.

postgres=# select * from vwife;
 id |  name   | dresssize
----+---------+-----------
  3 | dodie   |        13
  4 | heather |        10
  2 | katie   |        11
(3 rows)

postgres=# update vwife
           set name = 'Katheryn',
               dresssize = 12
           where (id,name,dresssize)=(2,'katie',11);
UPDATE 0

postgres=# select * from vwife;
 id |   name   | dresssize
----+----------+-----------
  3 | dodie    |        13
  4 | heather  |        10
  2 | Katheryn |        11
      ^^^^^^^^  <--  update 0 is false

CREATE OR REPLACE RULE vwife_update AS ON UPDATE TO public.vwife
DO INSTEAD
(
    UPDATE public.person
    SET name = NEW.name
    WHERE id = OLD.id;

    UPDATE public.wife
    SET dresssize = NEW.dresssize
    WHERE id = OLD.id
);



pgsql-general by date:

Previous
From: Glen Parker
Date:
Subject: Second attempt, roll your own autovacuum
Next
From: Peter Eisentraut
Date:
Subject: Re: feature request for Postgresql Rule system.