Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What happened to NpgsqlCopySerialize and NpgsqlCopyIn

I upgraded to npgsql 3.0.3 and discovered that NpgsqlCopySerialize and NpgsqlCopyIn where no longer part of the npgsql namespace. I made use of these classes in a streaming copy class that moved data from sql server to postgresql. Are there any classes that can be used to replace the functionality that these two classes provided?

Thank you all for taking the time to read this.

like image 506
FlaGator Avatar asked Oct 08 '15 19:10

FlaGator


2 Answers

The Npgsql bulk copy API has been completely rewritten for version 3.0, using binary encoding for much better performance. Documentation on the new API is available at http://www.npgsql.org/doc/copy.html, I've also added a note in the migration notes.

like image 59
Shay Rojansky Avatar answered Nov 03 '22 21:11

Shay Rojansky


Well obviously they're not in the git repo for version 3.

There's no mention of it on the 3.0 migration docs either. http://www.npgsql.org/doc/migration-3.0.html

I'd advise you to submit an issue at https://github.com/npgsql/npgsql/issues

If you still need them with version 3.x, you could get them from the support branch. (github.com/npgsql/npgsql/tree/support/2.x/Npgsql/Npgsql)

like image 1
JMG Avatar answered Nov 03 '22 21:11

JMG