-
Notifications
You must be signed in to change notification settings - Fork 185
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
32-bit support #232
32-bit support #232
Conversation
This can be useful when building for WASM targets, as well as for legacy systems that run on 32-bit. The relevant code is enabled at compile time by checking the pointer size (__SIZEOF_POINTER__ == 4).
This mainly helps with resolving compiler warnings, and should not have any effective difference, since the relevant struct (RTEPermissionInfo) is not actually used in raw parsing.
@@ -1272,7 +1272,7 @@ message RTEPermissionInfo | |||
{ | |||
uint32 relid = 1 [json_name="relid"]; | |||
bool inh = 2 [json_name="inh"]; | |||
int64 required_perms = 3 [json_name="requiredPerms"]; | |||
uint64 required_perms = 3 [json_name="requiredPerms"]; |
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.
As noted in the commit message, this is okay to do only because this struct isn't actually used in raw parse trees. Otherwise this would be an API break (which may be okay in the context of how we use these protobufs, but at least we should talk about doing this outside of major releases).
FYI, I tried out this PR and it fixes the problem, all CI tests are green again! |
We've previously managed these in the Makefile inline, but that is very hard to read, and not necessary, since we can simply concatenate the override file to pg_config.h during the source extraction process.
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.
It's a bit tricky to verify this with go-pgquery since I use the C sources from pg_query_go instead of these ones to make sure they align, but I think this should fix my issue well. Thanks a lot!
Just to close the loop, after updating I could remove my 32-bit support patch. Thanks! |
Fixes #231