Move postgres stuff to `pg` mod