Skip to content

feat(primitives): add Postgres support to fixed-bytes wrappers - #1175

Merged
DaniPopes merged 4 commits into
alloy-rs:mainfrom
zexoverz:feat/postgres-address-1032
Sep 2, 2026
Merged

DaniPopes merged 4 commits into
alloy-rs:mainfrom
zexoverz:feat/postgres-address-1032

Conversation

@zexoverz

Copy link
Copy Markdown
Contributor

Closes #1032. Address is declared with wrap_fixed_bytes! rather than being an alias, so the blanket FixedBytes<BITS> impls at the top of the module never applied to it and users had to wrap it themselves.

Kept to BYTEA only, matching what the FixedBytes pair accepts. Signed supports text and numeric types too but an address has no meaningful numeric reading, and adding a hex TEXT path would be a guess at what people store rather than something the issue asked for.

@github-project-automation github-project-automation Bot moved this to Reviewed in Alloy Aug 27, 2026
@zexoverz

Copy link
Copy Markdown
Contributor Author

The red is allocative 0.3.6 failing to compile on nightly, where its Infallible and ! impls now collide. main has been failing the same way since 1.7.1, so nothing here comes from this PR.

@onbjerg

onbjerg commented Aug 31, 2026

Copy link
Copy Markdown
Member

yep, can't merge while this is failing though. will rebase once fixed.

@decofe decofe changed the title feat(primitives): ToSql/FromSql for Address in postgres mod feat(primitives): add Postgres support to fixed-bytes wrappers Sep 2, 2026
@DaniPopes

Copy link
Copy Markdown
Member

thanks, moved to the macro itself to implement it for all types

@DaniPopes
DaniPopes enabled auto-merge (squash) September 2, 2026 20:45
@DaniPopes
DaniPopes merged commit d35dbee into alloy-rs:main Sep 2, 2026
31 checks passed
@github-project-automation github-project-automation Bot moved this from Reviewed to Done in Alloy Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[Feature] To/From Sql for address type in postgres mod

3 participants