Strange order of execution with rule

From: han(dot)holl(at)informationslogik(dot)nl
To: pgsql-general(at)postgresql(dot)org
Subject: Strange order of execution with rule
Date: 2005-10-20 20:52:12
Message-ID: 200510202252.13281.han.holl@informationslogik.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general


Hello,

I have something like this:
CREATE or replace rule update_rule as on update
to aview
do instead (
select func_display(new, old);
select rubriek('reset', 0, '', 0);
);

(Postgres 8.0.3).

I tried all kinds of variations (one select with two functions, and two
different update rules with a select each) but in _all_ cases the second
function is executed before the first, or possibly at the same time (but I
didn't think the backend is threaded).

Is this known behaviour, and what can I do to change it?

Thanks in advance for any suggestions,

Han Holl

P.S. I don't know if it's relevant but what func_display and rubriek do has
nothing to do with the database. Let's say they do some kind of logging.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Richard_D_Levine 2005-10-20 21:11:58 Re: [HACKERS] 'a' == 'a '
Previous Message Andrew Sullivan 2005-10-20 20:47:42 Re: Select all invalid e-mail addresses