-
-
Notifications
You must be signed in to change notification settings - Fork 255
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
Make unboxing args sound with ArgAbi
#1731
Merged
workingjubilee
merged 67 commits into
pgcentralfoundation:develop
from
workingjubilee:arg-abi-draft
Jun 29, 2024
Merged
Changes from all commits
Commits
Show all changes
67 commits
Select commit
Hold shift + click to select a range
4e3447b
pipe through fcx lifetime
workingjubilee e342477
Partial revert
workingjubilee 5061f60
Primitive borrow-checking internal wrapper
workingjubilee de7a546
Bypass pg_guard so lifetimes can typecheck
workingjubilee 2904955
Remove a space
workingjubilee 3b45a47
Add a FIXME
workingjubilee 37c7ad5
sketch out argabi
workingjubilee 0f0a366
remarks about features
workingjubilee df69adf
lifetimes everywhere
workingjubilee ee8286e
stamp out some argabi impls
workingjubilee d16aef2
Weaken pgrx-pg-sys panic bounds
workingjubilee 7ca24cb
Remodel macro expansion
workingjubilee f7d00c0
Add safer versions to RetAbi
workingjubilee caa22f6
Remove fcinfo stub
workingjubilee 6f8a384
Make almost all types compile with ArgAbi unboxing
workingjubilee 9c1737c
impl ArgAbi for HexInt
workingjubilee e684fee
Revert "Weaken pgrx-pg-sys panic bounds"
workingjubilee be4c65f
make FcInfo work without weakening pg_extern_c_guard
workingjubilee a45ccd7
Fuck off rustfmt
workingjubilee 3f13ff1
Impl ArgAbi for pg_sys::FunctionCallInfo
workingjubilee 778f81f
Resolve the last lifetime error by reusing some lifetimes
workingjubilee 2820321
Claim victory over static strings
workingjubilee 1508e00
Claim victory over static composite types in aggregates
workingjubilee d89b300
Remember to use public reexports
workingjubilee eed434a
Stub out a few more ArgAbi impls
workingjubilee 89b16d1
Fixup victory lap tests
workingjubilee 6548283
Stubbier ArgAbi impl
workingjubilee d93ade6
Remove needless borrow
workingjubilee 4fd1799
Reuse reexports
workingjubilee aeaacd2
Support Vec<u8> as an argument
workingjubilee b114ce6
Make more things compile even though it doesnt make sense yet
workingjubilee 775ccfd
Make the table iterators die
workingjubilee 8ac225d
More bad aggregates
workingjubilee 9c274b5
Add Arguments iterator
workingjubilee 85f0861
Make Arguments peekable
workingjubilee 9467575
Fixup args
workingjubilee a856776
Fixup all the arg types
workingjubilee 05448d1
Handle virtual args correctly
workingjubilee 648619a
Pipe through array construction via ArgAbi
workingjubilee a78786c
impl ArgAbi for FunctionCallInfo again
workingjubilee 0dc7a40
Correctly bound ArgAbi for Vecs
workingjubilee 954dc39
ArgAbi for Vecs
workingjubilee f206eff
Initial tests passing
workingjubilee e4f28bd
Dont test a bad function
workingjubilee 8192075
Handle polymorphic arg cases
workingjubilee 0168121
move more bad aggregates
workingjubilee a247fe9
improve error messages
workingjubilee 1a09c8d
type inference take the wheel
workingjubilee 3721045
Drop support for error messages via the InOutFuncs trait
workingjubilee a0a6c32
Accept mostly-inconsequential diffs in tests
workingjubilee 6ac3cb7
Remove initial unbox_from_fcinfo_index fn
workingjubilee a624959
Fix doctest
workingjubilee db122c3
There is only one sound path forward
workingjubilee 00c5182
Remove unused imports and extra quals
workingjubilee c8e83e8
cleanup macro expansion so it is easier to read
workingjubilee a787c71
Use an underscore-free fcinfo ident to silence a clippy warning
workingjubilee 7f14af0
comments
workingjubilee b68b4fc
Initial safety comment on unbox_argument family
workingjubilee 20974c5
Erase a lifetime transmutation
workingjubilee 3395b1b
Readd Vec example in strings
workingjubilee 1f73271
Support nullable args better
workingjubilee a4aad19
Revert "Drop support for error messages via the InOutFuncs trait"
workingjubilee fd587cb
Accept more diffs in UI tests
workingjubilee 9a1766d
Actually support Nullable in arg/ret
workingjubilee 12d3977
argh
workingjubilee 7d4a89d
tests argh
workingjubilee 7803c12
raw_oid perf note
workingjubilee File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
What's the plan for this? Aggregate support is a pretty important feature
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.
The problem isn't with Aggregate, per se, it's with certain types.
These are aggregates that are supposed to manage composite types. But we know composite types are allocated in Postgres, thus are effectively lifetime-bound. But
#[pg_aggregate]
and Aggregate don't know how to convey the lifetimes through. Thus even annotating it with something like this does not actually fix the problem:Thus in order to make aggregates work for complex cases we must break the world for them as well, making all their functions use the correct, lifetime-bound types. Hopefully this will let us simplify the code expansion for them as well.