-
-
Notifications
You must be signed in to change notification settings - Fork 40
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
Fix PostgreSQL enum arrays and case-sensitive types #108
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!! @niklaskorz Great stuffs!
@billy1624 |
Thanks!! @niklaskorz Is there a way to add a test cases for it? |
I'll look into that, |
Yes, please! |
Still trying to pinpoint what exactly causes the issue on PG's side... I do have a schema where I can reproduce the issue, but I'm not yet able to reproduce this in a smaller isolated schema. |
Interesting, the problem only occurs with types that have upper case letters in their names. For these, |
Going down this rabbit hole, I found the actual cause of the issue and the JOIN-heavy workaround becomes unnecessary. :) Working on the according commit right now, but basically the value of |
Thanks!! @niklaskorz One question. Why not |
Now, if we run |
Ahhhh... I see what you mean now! Thanks for the explanation! |
@billy1624 @tyt2y3 Just saw that 0.12 was released without this... any chance we can get this and SeaQL/sea-orm#1678 in soon? |
The current release is for SQLx 0.6 and the next SeaORM will depend on SQLx 0.7, so we need another SeaSchema release for that. I'll see whether we can get this in the next release. |
@billy1624 as discussed, we will merge this after a slight cleanup. |
Cleaning up :P |
@tyt2y3 done |
🎉 Released In 0.14.0 🎉Thank you everyone for the contribution! |
PR Info
Bug Fixes
udt_name::regtype
panics ifudt_name
contains uppercase letters. This is fixed by wrapping the value ofudt_name
in double quotes:CONCAT('"', udt_name, '"')::regtype
EnumDef
if an enum for that type name is found and then returning aType::Enum
.