Howdy,
Not sure if PostgreSQL uses time_t, but if so, this project provides useful code (a drop-in replacement for time.h) to address the 2038 bug on 32-bit platforms.
http://code.google.com/p/y2038/
Useful for PostgreSQL?
Best,
David