code: async def copy_records_to_table(self, table_name, *, records,
                                      columns=None, schema_name=None,
                                      timeout=None):
          
          tabname = utils._quote_ident(table_name)
          if schema_name:
              tabname = utils._quote_ident(schema_name) + '.' + tabname
  
          if columns:
              col_list = ', '.join(utils._quote_ident(c) for c in columns)
              cols = '({})'.format(col_list)
          else:
              col_list = '*'
              cols = ''
  
          intro_query = 'SELECT {cols} FROM {tab} LIMIT 1'.format(
              tab=tabname, cols=col_list)
  
          intro_ps = await self._prepare(intro_query, use_cache=True)
  
          opts = '(FORMAT binary)'
  
          copy_stmt = 'COPY {tab}{cols} FROM STDIN {opts}'.format(
              tab=tabname, cols=cols, opts=opts)
  
          return await self._copy_in_records(
              copy_stmt, records, intro_ps._state, timeout)
docs: Copy a list of records to the specified table using binary COPY.
  
          :param str table_name:
              The name of the table to copy data to.
  
          :param records:
              An iterable returning row tuples to copy into the table.
  
          :param list columns:
              An optional list of column names to copy.
  
          :param str schema_name:
              An optional schema name to qualify the table.
  
          :param float timeout:
              Optional timeout value in seconds.
  
          :return: The status string of the COPY command.
  
          Example:
  
          .. code-block:: pycon
  
              >>> import asyncpg
              >>> import asyncio
              >>> async def run():
              ...     con = await asyncpg.connect(user='postgres')
              ...     result = await con.copy_records_to_table(
              ...         'mytable', records=[
              ...             (1, 'foo', 'bar'),
              ...             (2, 'ham', 'spam')])
              ...     print(result)
              ...
              >>> asyncio.get_event_loop().run_until_complete(run())
              'COPY 2'
  
          .. versionadded:: 0.11.0