refatorado dao postgres