From: | Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com> |
---|---|
To: | Joel Burton <joel(at)joelburton(dot)com> |
Cc: | Aasmund Midttun Godal <postgresql(at)envisity(dot)com>, pgsql-sql(at)postgresql(dot)org, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: CREATE RULE ON UPDATE/DELETE |
Date: | 2001-10-21 08:33:59 |
Message-ID: | Pine.BSF.4.21.0110210129570.41420-100000@megazone23.bigpanda.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers pgsql-sql |
> Don't think so. I think the rule doesn't make any sense.
> NEW.id and OLD.id are probably dbl values, so saying OLD.id=id (where id
> is raw.id since that's the update table) isn't correct. It probably
> should be OLD.id=id*2 (which seems to work for me, btw) It's editing
> a different row than the one that's being selected.
I forgot to mention in this that I needed to made an additional change in
the rule to make the ids come out correct at the end :(. The update set
id=NEW.id should be id=NEW.id/2 of course... Otherwise the +10 becomes a
+20.
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2001-10-21 12:27:18 | CREATE TABLE AS / WITHOUT OIDs? |
Previous Message | Stephan Szabo | 2001-10-21 07:41:29 | Re: CREATE RULE ON UPDATE/DELETE |
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2001-10-21 16:47:41 | Re: CREATE RULE ON UPDATE/DELETE |
Previous Message | Stephan Szabo | 2001-10-21 07:41:29 | Re: CREATE RULE ON UPDATE/DELETE |