The examples from the PDF I gave you on BerkeleyDB work great with KDEvelop (I used them together myselve in my latest project)..

I haven't used postgreSQL and C++ together myselve though, but http://gborg.postgresql.org/project/...rojdisplay.php
should help you allong..

Good luck..