Take a look at http://www.jsg.dk/postgresqlHere you can find a MFC project version og libpq, and another project called PGAccess which make accessing postgreSQL very easy using dynasets.
Jakob Lund