Re: How to mimic Perl's DBD::Pg's do('COPY...')/pg_putline/pg_endcopy ?

"Karsten Hilbert" <[email protected]>
Newsgroups gmane.comp.python.db.psycopg.devel
Message-ID <[email protected]>
> Sorry, I should have pointed out that I had looked at those examples, and
> they do not illustrate the functionality I described in my original
> message.
> Those examples require either 1) creating a temporary file from which the
> data could be read; or 2) create a "file-like object" resident in memory.
> Either of these two requirements is inconvenient when the amount of data
> to
> be processed is large (which is precisely the times when one would want to
> use PostgreSQL's COPY feature).

You could make a file-like object that's a generator wrapper around
the original file you want to COPY in.

Karsten
-- 
GRATIS für alle GMX-Mitglieder: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://portal.gmx.net/de/go/maxdome01
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.