Re: Rule system and unsucessful updates.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Matthew Schumacher <matt(dot)s(at)aptalaska(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Rule system and unsucessful updates.
Date: 2006-01-16 17:41:46
Message-ID: 9674.1137433306@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Matthew Schumacher <matt(dot)s(at)aptalaska(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2006-01-16 17:57:46 Re: [PATCH] Better way to check for getaddrinfo function.
Previous Message Sergey Moiseev 2006-01-16 17:33:16 Re: Create/Erase 5000 Tables in PostGRE SQL in execution