Plpgsql seems to be deleting and inserting instead of updating - Why?
PostgreSQL doesn't really do updates, it does the equivalent to delete and insert in terms of how it does them.  It leaves the old version of the row in place and creates a new version that all future transactions will see.  Eventually vacuum reclaims the old row space for reuse.  A word of advice, update immediately to a supported release. 7.4 is VERY old, is no longer supported, and has known data eating bugs that will never be fixed.  I'd recommend going right to 9.0, and researching the issues with removed implicit casts which will be the biggest problem.  We had to fix three queries in out app when we went to 8.3 the first version to remove implicit casts.