def METHOD_NAME(self, RelationId, dump_sub_elements=False):
    self._PgCurs.execute("SELECT relations.id, relations.version, users.name, relations.tags FROM relations LEFT JOIN users ON relations.user_id = users.id WHERE relations.id = %d;" % RelationId)
    r1 = self._PgCurs.fetchone()
    if not r1: return None
    data = {
        u"id": r1[0],
        u"version": r1[1],
        u"user": r1[2] or "",
        u"tag": r1[3],
        u"member": [],
    }
    if dump_sub_elements:
        self._PgCurs.execute("SELECT member_id, member_type, member_role FROM relation_members WHERE relation_id = %d ORDER BY sequence_id;" % RelationId)
        for r1 in self._PgCurs.fetchall():
            data[u"member"].append({u"ref":r1[0], u"type":{"N":"node","W":"way","R":"relation"}[r1[1]], u"role":r1[2]})
    return data