def extend_relations(self, data, kind):
<EOL>try:<EOL><INDENT>data = [self.escaped_names(d) for d in data]<EOL><DEDENT>except Exception:<EOL><INDENT>data = []<EOL><DEDENT>metadata = self.dbmetadata[kind]<EOL>for relname in data:<EOL><INDENT>try:<EOL><INDENT>metadata[self.dbname][relname[<NUM_LIT:0>]] = ['<STR_LIT:*>']<EOL><DEDENT>except KeyError:<EOL><INDENT>_logger.error('<STR_LIT>',<EOL>kind, relname[<NUM_LIT:0>], self.dbname)<EOL><DEDENT>self.all_completions.add(relname[<NUM_LIT:0>])<EOL><DEDENT>
Extend metadata for tables or views
        :param data: list of (rel_name, ) tuples
        :param kind: either 'tables' or 'views'
        :return: