Phillip Stack
Phillip Stack

Reputation: 3378

Import Data From csv Into Postgresql WITHOUT COPY

I am writing a function for a python environment which needs to import data from a csv file into an existing table. The scope in which the function can execute does not allow for a db SUPERUSER to run the function and so the COPY function is out of the question.

What other options are efficient?

The files range from 100,000 to 1,000,000 rows.

This question has also been posted here

Upvotes: 0

Views: 647

Answers (1)

Craig Ringer
Craig Ringer

Reputation: 324751

Use psycopg2's COPY ... FROM STDIN support.

Upvotes: 2

Related Questions