Hay un error: ERROR: column "postergaran" does not exist LINE 25: WHERE n.idnota =postergaran ^