Re: Odd on-update inconsistency

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Odd on-update inconsistency
Дата
Msg-id 25067.1227734247@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Odd on-update inconsistency  (Richard Huxton <dev@archonet.com>)
Список 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 по дате отправления:

Предыдущее
От: "Jaime Casanova"
Дата:
Сообщение: Re: pg_get_serial_sequence Strangeness/Unreliable?
Следующее
От: Kevin Kempter
Дата:
Сообщение: Date math question