-
-
Notifications
You must be signed in to change notification settings - Fork 296
Added pg_binary_protocol
attribute to derive send and receive functions for PostgresType
#2068
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
Merged
eeeebbbbrrrr
merged 83 commits into
pgcentralfoundation:develop
from
LucaCappelletti94:binary-protocol
May 31, 2025
Merged
Changes from all commits
Commits
Show all changes
83 commits
Select commit
Hold shift + click to select a range
822f074
Added dbg
LucaCappelletti94 1c1ea18
Trying to add binary protocol derives
LucaCappelletti94 52c30ce
Trying to impl send/receive
LucaCappelletti94 83582c5
Trying to write the send/recv funcs
LucaCappelletti94 f4da133
Trying out a different approach
LucaCappelletti94 cf264d5
Trying another approach for send/receive
LucaCappelletti94 cd85573
Added full path to StringInfo
LucaCappelletti94 7cce005
Trying out another approach for receive
LucaCappelletti94 383b643
Maybe fixed typos
LucaCappelletti94 bebf375
Trying to fix codegen
LucaCappelletti94 0b5140a
Attempted to solve other issues
LucaCappelletti94 011f88e
Removed unnecessary option wrap
LucaCappelletti94 4e7fb85
Debugging
LucaCappelletti94 6f71884
Fixed other typos
LucaCappelletti94 07dcbf0
Tried to fix more generation errors
LucaCappelletti94 e33c6df
Tried to solve other issues
LucaCappelletti94 816169d
Specified type
LucaCappelletti94 2c933c1
Specified different type
LucaCappelletti94 6cef3f6
Trying different type
LucaCappelletti94 aaa6867
Added missing unsafe block
LucaCappelletti94 483e9e0
Testing different approach
LucaCappelletti94 cadbd0e
Testing different approach
LucaCappelletti94 b643f4d
Testing
LucaCappelletti94 7d85a10
Testing a different approach
LucaCappelletti94 8b3a117
Added missing use
LucaCappelletti94 84e027d
Trying to add the number of fields
LucaCappelletti94 2a9b74a
Made error more verbose
LucaCappelletti94 0f7443a
Fixed error in expect
LucaCappelletti94 d3c0e88
Attempting new approach based on discord discussion
LucaCappelletti94 bc974cf
Fixing let else syntax
LucaCappelletti94 ba1d028
Added full Oid path and fixed double unreachable
LucaCappelletti94 b857685
Attempting to skip 4 bytes for varlena
LucaCappelletti94 7a74459
Attempting again the `cbor`-based send/recv approach
LucaCappelletti94 e53e8e7
Formatted code
LucaCappelletti94 8df6026
Found where the `*_in` and `*_out` funcs are ignored and added `*_sen…
LucaCappelletti94 dabc642
Changed signature of `send` from `Internal` to `Vec<u8>`
LucaCappelletti94 f290caf
Moved location of `_send` and `_recv`
LucaCappelletti94 2d85c63
Fixed typo in generated code - missing semicolon
LucaCappelletti94 98baf8b
Fixed syntax relative to `unsafe` let Some else codeblock
LucaCappelletti94 238f1aa
Fixed error in calling `from_datum`
LucaCappelletti94 d90c25c
Testing what happens if body of functions is left out
LucaCappelletti94 1b1625d
Decommented part of the `recv` structure
LucaCappelletti94 42d4b46
Uncommented another portion of the `recv` function
LucaCappelletti94 7b53c38
Uncommented remainder of `recv` function
LucaCappelletti94 2a19e1e
Debugging - 1
LucaCappelletti94 382bce4
Moved todo used for debug - 2
LucaCappelletti94 d1d12a3
Still debugging cbor_decode
LucaCappelletti94 144cd9a
Deferenced varlena
LucaCappelletti94 74c9044
Debugging cbor decode
LucaCappelletti94 2445dbf
Added todo to debug buffer content
LucaCappelletti94 2e79a8f
Removed other todo
LucaCappelletti94 2f677ee
Commented code after todo
LucaCappelletti94 de12f11
Attempting to read the data slice
LucaCappelletti94 f387164
Continuing the debugging efforts
LucaCappelletti94 e2c8c78
Trying a different approach
LucaCappelletti94 41e0819
Re-exporting serde_cbor to use in macros
LucaCappelletti94 6e37f10
Now debugging retrieved object
LucaCappelletti94 b5a24a8
Experimented with different signature to support lifetimes
LucaCappelletti94 3495b65
Fixed error in receive
LucaCappelletti94 b0ba0cb
Restored to the approach with no support for lifetimes
LucaCappelletti94 ccee8dc
Attempting a different approach using transmute on buf data
LucaCappelletti94 03fdb8b
Debugging received data
LucaCappelletti94 11cc69b
Experimenting with using buf.data as *mut pg_sys::varlena
LucaCappelletti94 44a105a
Fixed path to varlena
LucaCappelletti94 46e70b3
Wrapped unsafe code
LucaCappelletti94 2fcbf08
Trying to circumnavigate cursor check
LucaCappelletti94 9cefb52
Decommented send
LucaCappelletti94 d1593e7
Trying a different approach
LucaCappelletti94 858eb31
Working on the self-contained varlena approach
LucaCappelletti94 231fa09
Fixed typing
LucaCappelletti94 511e131
Trying a different approach to create varlena using StringInfo
LucaCappelletti94 3262afc
Fixed relative pg_sys path
LucaCappelletti94 d6fa730
Added complete path to StringInfo
LucaCappelletti94 f72a410
Added missing from_raw_parts
LucaCappelletti94 b3973e8
Introduced #[pg_binary_protocol] to enable binary protocol derive
LucaCappelletti94 56e9aa1
Fixed errors in derive of PostgresType
LucaCappelletti94 362ba1e
Added missing attribute to list
LucaCappelletti94 c739ddb
Documented attribute
LucaCappelletti94 430e40d
Added missing curly braces
LucaCappelletti94 f4a2a91
Added missing `Some`
LucaCappelletti94 91e7ccd
Fixed when Default is enabled
LucaCappelletti94 00ec58c
Removed typo
LucaCappelletti94 2f3d5bf
Removed pointless comments
LucaCappelletti94 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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.
Uh oh!
There was an error while loading. Please reload this page.