turbodbc
turbodbc copied to clipboard
Postgresql TIME column unsupported type identifier
Using: postgresql 9.5 (postgresql95-odbc-09.05.0400-1PGDG.rhel7.x86_64) ODBC Postgresql 9.5 Turbodbc 1.1.1 Python 2.7.5
Table definition:
\d t1
Table "public.t1"
Column | Type | Modifiers
--------+---------------------------+-----------
c1 | character varying(10) |
d1 | date |
t1 | time(0) without time zone |
Program snippet:
con=connectPGSQL()
mscur = con.cursor()
msinsert='insert into t1 ( c1,d1,t1 ) values( ? , ? , ? )'
mscur.executemany(msinsert,rows)
Error:
RuntimeError: Error! Unsupported type identifier for column parameter_3 @ NULLABLE SQL_TYPE_TIME (precision 8, scale -1))
Hi! Thanks for reporting! Time columns are indeed not supported yet. By the way, if you are looking for sheer performance for PostgreSQL, try psycopg2 or asyncpg; the official PostgreSQL ODBC driver is very slow. So there is not much turbodbc can do for you here. Just telling you so that you are not underwhelmed ;-)
Ah right. Thank you.
I was rather hoping to use turbodbc to allow me to push data rapidly into either SQL Server (works very well) or PostgreSQL (works not so well) without using an ORM or multiple modules (same code, multiple database targets). Point about psycopg2 noted though, and I've switched to using execute_batch with that, and it's fast enough that way. Cheers
is there actually any update on the implementation for time columns?