-
Notifications
You must be signed in to change notification settings - Fork 818
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
BitArray: bit string length 1 does not match type bit(256) #2269
Comments
Per the previous thread:
|
O ic. "bit(8)[2]" would equal two bytes. I was thinking bit(8) was the same thing as bit[8] as in bit always meant a single bit as in a bit from a byte for example. Bit in this case can be any dimension for postgresql. So guess I'm looking to create a fixed size of bit(1)[256] in length. Which means I create a single bit and set its length to 256 in postgresql terms? |
Yep that was it. Ok sorry for the confusion. Was just doing stuff in MySQL which is a lot more limited. PostgreSQL is awesome it divides stuff up like this. |
No worries! I actually misread your error message to be Glad that we were able to get to the bottom of it. Feel free to post back here if you encounter any other issues with this topic. |
P.S. I've opened #2270 to track updating the docs with a sample or two based on this thread. |
Created a postgresql tabel on my local computer with 2 columns (SystemID [as uuid], TrackingIDs [as Bit[] with size 256]).
In C# ASP.NET I'm getting the error:
"new BitArray(256)" is 256 in length not '1' as the error suggests.
Here is an example of my C# code:
Further technical details
pgAdmin4: 3.6
Npgsql version: 4.0.4
PostgreSQL version: 11.1
Operating system: Win10 x64
ASP.NET: .NET Core 2.2
The text was updated successfully, but these errors were encountered: