equal
deleted
inserted
replaced
62 |
62 |
63 def _execmany_thread_copy_from(cu, statement, data, table, |
63 def _execmany_thread_copy_from(cu, statement, data, table, |
64 columns, encoding='utf-8'): |
64 columns, encoding='utf-8'): |
65 """ Execute thread with copy from |
65 """ Execute thread with copy from |
66 """ |
66 """ |
67 buf = _create_copyfrom_buffer(data, columns, encoding=encoding) |
67 try: |
68 if buf is None: |
68 buf = _create_copyfrom_buffer(data, columns, encoding=encoding) |
|
69 except ValueError: |
69 _execmany_thread_not_copy_from(cu, statement, data) |
70 _execmany_thread_not_copy_from(cu, statement, data) |
70 else: |
71 else: |
71 if columns is None: |
72 if columns is None: |
72 cu.copy_from(buf, table, null='NULL') |
73 cu.copy_from(buf, table, null='NULL') |
73 else: |
74 else: |