npgsql/Npgsql — pull request #229 by franciscojunior (2014-05-06 22:43:17+00:00)
Title: Fix NpgsqlCopyIn concurrent usage

This patch fixes #219.

Npgsql was using a singleton NpgsqlCopyIn but it couldn't be a singleton because there was state being exposed.
This state is the CopyFormat object which is different depending in the structure of the table being copied.
By using the same NpgsqlCopyIn object for all operations, when using two different NpgsqlCopyIn operations, they would interfere in each other causing problems.

Thanks Chupa Kabra (http://pgfoundry.org/users/chupakabra/) for test code.
Thanks Marcin Glowacki (http://pgfoundry.org/users/serine/) for the patch.
Thanks Jelmer Baas for testing the patch.