Hi all,
I don't know how much is effective or if it's applicable
to postgresql processe but it's an interesting article:
http://www.onlamp.com/pub/a/onlamp/2004/10/28/design_by_contract_in_c.html
Regards
Gaetano Mendola