Moving postgres attribute logic to attributes folder