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

Add binary input/output functions #59

Closed
xanderio opened this issue Oct 8, 2021 · 5 comments · Fixed by #62
Closed

Add binary input/output functions #59

xanderio opened this issue Oct 8, 2021 · 5 comments · Fixed by #62

Comments

@xanderio
Copy link

xanderio commented Oct 8, 2021

This extension seems to only support text input/output, and lacks binary input/output (receive/send) functions. Binary transfer would make transfer much more efficient on these types of values, and would make the extension usable in a wider range of contexts. For example sqlx which only supports binary transfer. See issue launchbadge/sqlx#1480 and launchbadge/sqlx#1269.

@theory
Copy link
Owner

theory commented Oct 30, 2021

Happy to merge a pull request that adds send and receive functions. I assume that sqlx is unable to handle any types without send and receive, like ltree, yes?

@abonander
Copy link

What would be a good binary format? Something like (in Postgres Message Data Types):

Int64 majorVersion
Int64 minorVersion
Int64 patchVersion
String prerelease

@theory
Copy link
Owner

theory commented Nov 10, 2021

The most portable is probably to pack them into a char string, literally the ascii bytes that make up a semver. Might also eventually end up as the internal representation, too (see extensive discussion in #47).

@abonander
Copy link

Yeah, that was the alternative I already had in mind.

@theory theory linked a pull request Oct 16, 2022 that will close this issue
@theory
Copy link
Owner

theory commented Oct 23, 2022

v0.32.0 now released and on PGXN with support for binary input and output.

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

Successfully merging a pull request may close this issue.

3 participants