SQLAlchemy, Psycopg2 and Postgresql COPY

postgresql, psycopg2, sqlalchemy

Solution

It doesn't look like it.

You may have to just use psycopg2 to expose this functionality and forego the ORM capabilities. I guess I don't really see the benefit of ORM in such an operation anyway since it's a straight bulk insert and dealing with individual objects a la an ORM would not really make a whole lot of sense.

Problem

It looks like Psycopg has a custom command for executing a COPY: psycopg2 COPY using cursor.copy_from() freezes with large inputs Is there a way to access this functionality from with SQLAlchemy?

Original source

Related problems