I have got a datatable with thousands of records. I have got a postgres table with the same fields of the datatable. I want everyday to truncate this table and fill again wi
There is some option to bulk insert into PostgreSQL.
By example, in my library, I'm using the SQL Copy
COPY TableName (Column1, Column2, Column3) FROM STDIN BINARY
Disclaimer: I'm the owner of the project Bulk-Operations.NET
This library make it very easy to perform any kind of bulk operations:
In multiple database provider including PostgreSQL
// Easy to use
var bulk = new BulkOperation(connection);
bulk.BulkInsert(dt);
bulk.BulkUpdate(dt);
bulk.BulkDelete(dt);
bulk.BulkMerge(dt);