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

Implement conversion from XID to u32 #1209

Open
msmoiz opened this issue Feb 4, 2025 · 0 comments
Open

Implement conversion from XID to u32 #1209

msmoiz opened this issue Feb 4, 2025 · 0 comments

Comments

@msmoiz
Copy link

msmoiz commented Feb 4, 2025

I was trying to deserialize a system table and received the following error:

cannot convert between the Rust type `core::option::Option<u32>` and the Postgres type `xid`

Is it reasonable to implement FromSql for this conversion within the types crate, or is there a good reason to have consumers do it themselves using a wrapper type? Based on the documentation, it seems like XID is 32-bits in PostgreSQL, so I would expect this to be the correct conversion in most cases.

P.S. Thanks for supporting this crate!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant