Re: Rule system and unsucessful updates. - Mailing list pgsql-general

From Tom Lane
Subject Re: Rule system and unsucessful updates.
Date
Msg-id 9674.1137433306@sss.pgh.pa.us
Whole thread Raw
In response to Rule system and unsucessful updates.  (Matthew Schumacher <matt.s@aptalaska.net>)
Responses Re: Rule system and unsucessful updates.  (Matthew Schumacher <matt.s@aptalaska.net>)
List pgsql-general
Matthew Schumacher <matt.s@aptalaska.net> writes:
> I'm having trouble getting the rule system to work on updates that do
> not match the where clause.

You did not say what you mean by "doesn't work", but what I suspect you
are getting bit by is that ON UPDATE rules fire before the original
query is done.  By the time the original query executes, you've inserted
a row into accounting_tab and so its added condition fails.

            regards, tom lane

pgsql-general by date:

Previous
From: Sergey Moiseev
Date:
Subject: Re: Create/Erase 5000 Tables in PostGRE SQL in execution
Next
From: Tom Lane
Date:
Subject: Re: [PATCH] Better way to check for getaddrinfo function.