pg::db moved to defined type