Ouch, this means that for every insert we would have to trigger a procedure which will:

COUNT
IF > Limit
DELETE OLDEST

This would be pretty much damn ressource intensive on a table with million
of records, would not it ?



You can keep the count in a table on the side, and have it updated by the same trigger (after insert or delete)...


Dima



---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

http://archives.postgresql.org

Reply via email to