Home > Enterprise >  BeginBinaryImport in a transaction
BeginBinaryImport in a transaction

Time:07-13

As far as I can tell, the COPY command in Postgres supports transactions, but I don't see a way to specify a transaction with NpgsqlConnection.BeginBinaryImport. Is it not supported?

CodePudding user response:

BeginBinaryImport implicitly participates in a transaction started before it. So just do NpgsqlConnection.BeginTransaction first, and then call BeginBinaryImport.

  • Related