Project

General

Profile

« Previous | Next » 

Revision 3139

csv2db: Fixed bug where table needed to be a sql_gen.Table object with the proper schema, so that errors_table would be created in the correct schema. Removed no longer needed changing of the search_path.

View differences:

csv2db
91 91
            # Create COPY FROM statement
92 92
            if use_copy_from[0]:
93 93
                cur = db.db.cursor()
94
                copy_from = ('COPY '+esc_name(table)+' ('
94
                copy_from = ('COPY '+table.to_str(db)+' ('
95 95
                    +(', '.join(map(esc_name, col_names)))
96 96
                    +') FROM STDIN DELIMITER %(delimiter)s NULL %(null)s')
97 97
                assert not csvs.is_tsv(dialect)

Also available in: Unified diff