> Doesn't PostGres come with Export/Import apps ? That would be easiest
> (and faster).
Yes, you can use "pg_dump production ... | psql testdb", but
this can lead to dead locks, if you call this during
a python script which is in the middle of a transaction. The python
script locks a table, so that psql can't write to it.
I don't think calling pg_dump and psql/pg_restore is faster.
> prod_cursor.execute('select data from production')
> for each_record in cursor.fetchall():
> dev_cursor.execute('insert into testing')
I know, but COPY is much faster.
Thomas
--
http://mail.python.org/mailman/listinfo/python-list