updated with correct psql handlers