Dear List,

Thanks for those who helped me with my last question.

I have a slightly related question:

I have five tables which are really intended to be one big table, but has been adapted 
to comply with Postgres's (irritating) 8kb tuple size limit (ver 7.0.3).

I have 'modtime' fields in each of these tables which record the last time a record 
was updated.  But I would like the behaviour to be such that a modtime field in each 
of these associated tables is updated when any of the tables are updated.  And I would 
like all of the modtime fields to take the same value if possible.

The primary/foreign keys for each of the tables do not necessarily have the same name.

I've currently imagined a trigger for each table that updates every other table every 
time it is updated.  But I've not had much success executing SQL from inside a plpgsql 
function at the moment - and wouldn't it create a cycle of triggers by updating a 
table's modtime, which in turn causes another modtime update in all the other tables, 
which in turn perpetuates the circle?

Any help greatly appreciated,
Thanks,
Rajit

Reply via email to