Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error "08P01: insufficient data left in message" when using NpgsqlBinaryImporter. #2623

Open
abdallahesam opened this issue Sep 16, 2019 · 0 comments

Comments

@abdallahesam
Copy link

commented Sep 16, 2019

The issue

I am trying to insert data in two tables using NpgsqlBinaryImporter but it fails for one table while it succeeds for the other.
When it fails I get the following exception :

Exception message: 08P01: insufficient data left in message
Stack trace:
   at Npgsql.NpgsqlConnector.<>c__DisplayClass161_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at Npgsql.NpgsqlConnector.<>c__DisplayClass161_0.<<ReadMessage>g__ReadMessageLong|0>d.MoveNext() in C:\projects\npgsql\src\Npgsql\NpgsqlConnector.cs:line 1032
--- End of stack trace from previous location where exception was thrown ---
   at Npgsql.NpgsqlConnector.ReadMessage(DataRowLoadingMode dataRowLoadingMode) in C:\projects\npgsql\src\Npgsql\NpgsqlConnector.cs:line 888
   at Npgsql.NpgsqlBinaryImporter.Complete() in C:\projects\npgsql\src\Npgsql\NpgsqlBinaryImporter.cs:line 303
   at CoreScratch.Program.HardCodedInsertInvoices(Invoice[] invoices) in C:\CoreScratch\Program.cs:line 86
   at CoreScratch.Program.Main(String[] args) in C:\CoreScratch\Program.cs:line 164

Steps to reproduce

I have included tables creation script and a demo program.
Demo.zip

Further technical details

Npgsql version: 4.0.10
PostgreSQL version: 10.6
Operating system: Windows 10 x64
.Net version: .net core 2.2

@roji roji added bug copy labels Oct 14, 2019
@roji roji added this to the 4.1.2 milestone Oct 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.