UInt64 and Npgsql
See original GitHub issueWhen using BulkInsertAsync, I’m seeing this error:
System.InvalidCastException: 'Can't write CLR type System.UInt64 with handler type NumericHandler'
When using BulkCopyAsync I get an index of of range exception. I’m guessing these errors have the same source. I am using Npgsql. EF Core 5.0 is creating rows for my ulong of type Numeric with precision 20, scale 0, and dimensions 0.
Issue Analytics
- State:
- Created 3 years ago
- Comments:7 (3 by maintainers)
Top Results From Across the Web
UInt64 and Npgsql · Issue #2624 · linq2db/ ...
I am using Npgsql. EF Core 5.0 is creating rows for my ulong of type Numeric with precision 20, scale 0, and dimensions...
Read more >Supported Types and their Mappings
Supported Types and their Mappings. The following lists the built-in mappings when reading and writing CLR types to PostgreSQL types.
Read more >Postgres: data types - How to store uint64 in postresql
@IvanVoras In my case, I am parsing data from binary packets. The field I'm storing is allocated exactly 8 bytes and is encoded...
Read more >PostgreSQL Types
binary: the 16 bytes txid_snapshot: (txid is a UInt64) A struct of UInt32 nxip (size of the xip array) txid xmin (no values...
Read more >Storing uint64 values in DB
What's the proper way to cast my uint64 as database signed integer and back safely in Go? Let's use 8-bit variable as example,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@douglasg14b yeah, that’s an EF Core value converter - that’s expected, no need for an issue. That’s all happening at the EF Core layer, not at the ADO.NET driver layer.
@roji Gotcha, I’m using this via EF Core, looks like it translates a
ulong
toh3index numeric(20,0) NOT NULL,
.If that it not expected there, then I can make an issue yeah.