| From: | Rajit Singh <singh(dot)raj(at)studychoice(dot)com> |
|---|---|
| To: | pgsql-general(at)postgresql(dot)org |
| Subject: | timestamp update field across multiple tables |
| Date: | 2001-01-12 10:40:03 |
| Message-ID: | 20010112104003.A18207@studychoice.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-general |
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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Oliver Elphick | 2001-01-12 10:56:43 | Re: timestamp update field across multiple tables |
| Previous Message | Boris Pran | 2001-01-12 10:26:41 | Re: win1250 encoding troubles |