On 2008-12-22, at 22:35, Dawid Kuroczko wrote:


atlantis=> CREATE OR REPLACE FUNCTION foo_trigger() RETURNS trigger AS
$$ BEGIN UPDATE bar SET t=NEW.t WHERE i=NEW.i; RETURN NULL; END; $$
LANGUAGE plpgsql;
atlantis=> CREATE TRIGGER foo_update BEFORE UPDATE ON foo FOR EACH ROW
EXECUTE PROCEDURE foo_trigger();
CREATE TRIGGER
CREATE FUNCTION
atlantis=> UPDATE foo SET t='##'||t;
UPDATE 0
^^^^^^^^^^

Grzegorz means such a situation.  Personally I understand the current
behavior to be correct -- since no row in that table is updated.

that's not quite what I meant. It is correct behavior in this situation - since we didn't update anything. Like I said, it is my bad - I should have tested it before emailing - hackers... So far my ratio of useful emails here is very low. :/


--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to