Re: Odd on-update inconsistency - Mailing list pgsql-general

From Tom Lane
Subject Re: Odd on-update inconsistency
Date
Msg-id 25067.1227734247@sss.pgh.pa.us
Whole thread Raw
In response to Re: Odd on-update inconsistency  (Richard Huxton <dev@archonet.com>)
List pgsql-general
Richard Huxton <dev@archonet.com> writes:
> Steve Crawford wrote:
>> I'm having trouble understanding something I saw in my data from
>> yesterday involving an inconsistency between values in a table and its
>> associated rule-updated log table.
>>
>> For application debugging purposes (effectiveness of web double-submit
>> suppression) we have a rule that creates an entry in a log table
>> whenever the table we are watching is updated:

> Ah, I think you'll find you don't. You have a rule that looks at first
> glance like it *should* add an entry to your log table.

We'd have to see the original query (the one the rule acted on) to be
sure, but I suspect Richard's diagnosis is correct.

> For inserting to a log table you'll want a trigger.

+1 ... triggers are way less likely to do strange things.

            regards, tom lane

pgsql-general by date:

Previous
From: "Jaime Casanova"
Date:
Subject: Re: pg_get_serial_sequence Strangeness/Unreliable?
Next
From: Kevin Kempter
Date:
Subject: Date math question