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

Simplify and fix some correctness issues with fixed-size byval arrays #1162

Merged
merged 5 commits into from
Jun 6, 2023

Conversation

thomcc
Copy link
Contributor

@thomcc thomcc commented Jun 6, 2023

  • Simplifies the code a good amount, mostly reling on postgres's documentation about byval types to be correct (and for the optimizer see through u32 -> Datum -> u32 and such).
  • Inlines some datum functions which are required for the optimizer to actually see through that in all cases.
  • Debug asserts about alignment more consistently, but it shouldn't ever be hit on x86_64 or aarch64.
  • if target_pointer_width == "32" some of the slice impls were busted, so they've been disabled on 32 bit. (Note that 32 bit support is quite experimental, and there are probably more things we do wrong there)

pgrx/src/datum/array.rs Outdated Show resolved Hide resolved
@eeeebbbbrrrr
Copy link
Contributor

This is v nice, @thomcc. Great cleanup and simplification and correctness. Much appreciated! Feel free to merge when you're ready.

@thomcc thomcc merged commit 18cd4bd into develop Jun 6, 2023
7 checks passed
@thomcc thomcc deleted the thomcc/array-fixes branch June 6, 2023 20:49
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

Successfully merging this pull request may close these issues.

None yet

2 participants