replace paintedfox with library postgres