-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Bug at using tables with more than 16 fields #477
Comments
What error are you getting? I think you are running into the default column number limitation. The docs for
Does this work for you when enabling the |
I'm supposed that is the problem. What there is to write in |
Where you define diesel as a dependency, you can also list the features you want to enable, like so: [dependencies]
diesel = { version = "0.8", features = ["postgres", "large-tables"] } |
The error that I get is like
|
I had in
|
It works now using:
Thanks! |
Great! |
I just ran into this issue and this is ridiculous. Why is there such a thing as "large table support?" Shouldn't it default to any size table you like? |
@lancecarlson I understand your frustration, but sadly it's a known limitation right now. In Diesel, but also in Rust itself: Tables are represented as tuples and currently, Rust does not have a way to deal with arbitrarily large tuples. If you want to know more, have a look at Diesel PR #747, the resulting rust-lang/rfcs#1921 and the newer rust-lang/rfcs#1935. |
Actually I guess this answers my other question |
The error for this is so ambiguous it's kind of ridiculous. Hopefully rust improves, removes this limitation for enums, and people stop using huge macros as fundamental functionality in their libraries. |
for anybody reading in 2019 large-tables got renamed to 32-column-tables for some reason:
I guess to avoid confusion with "large amounts of records tables"? anyway, this is the error that got me here:
in case anybody has the same problem. |
Yes, they were renamed when we were at the point of otherwise adding |
There is a little bug when you have a table with more than 16 fields.
To check it, I use this table:
And I run the next command
$ dropdb diesel_demo && diesel setup && cargo test
It should be ok. Now, comment out the field 'foo15' and try it again.
The text was updated successfully, but these errors were encountered: