def prep_create(self):
        sql = """CREATE TEMPORARY TABLE "%(table_name)s" (%(field_list)s);"""
        options = dict(table_name=self.temp_table_name)
        field_list = []

        # Loop through all the fields and CSV headers together
        for field, header in self.field_header_crosswalk:
            string = '"%s" %s' % (header, field.db_type(self.conn))

            # If the field has an override, use that
            if hasattr(field, 'copy_template'):
                string = '"%s" %s' % (header, field.copy_type)

            # If the model has a more-specific override, use that
            template_method = 'copy_%s_template' % field.name
            if hasattr(self.model, template_method):
                method = getattr(self.model(), template_method)
                if hasattr(method, 'copy_type'):
                    string = '"%s" %s' % (header, method.copy_type)

            # Add the string to the list
            field_list.append(string)

        # Join all the field strings together
        options['field_list'] = ", ".join(field_list)

        # Mash together the SQL and pass it out
        return sql % options
should record
dataset/ETHPy150Open california-civic-data-coalition/django-postgres-copy/postgres_copy/__init__.py/CopyMapping.prep_create--crossover with--dataset/ETHPy150Open plivo/plivohelper-python/tests/test_restxml.py/TestRecord.testRecordEmpty