PostgreSQL, triggers, and concurrency to enforce a temporal key
Posted
by Hobbes
on Stack Overflow
See other posts from Stack Overflow
or by Hobbes
Published on 2010-06-09T07:20:38Z
Indexed on
2010/06/09
7:42 UTC
Read the original article
Hit count: 228
I want to define a trigger in PostgreSQL to check that the inserted row, on a generic table, has the the property: "no other row exists with the same key in the same valid time" (the keys are sequenced keys). In fact, I has already implemented it. But since the trigger has to scan the entire table, now i'm wondering: is there a need for a table-level lock? Or this is managed someway by the PostgreSQL itself?
© Stack Overflow or respective owner