Skip to content

Backpatch specialized row decoders without breaking API changes - #56

Draft
mzabani wants to merge 27 commits into
masterfrom
backpatch-row-decs-pinned-byte-arrays
Draft

mzabani wants to merge 27 commits into
masterfrom
backpatch-row-decs-pinned-byte-arrays

Conversation

@mzabani

@mzabani mzabani commented Sep 13, 2026

Copy link
Copy Markdown
Owner

This is an attempt to do #54 without any breaking API changes, for two reasons:

  • Obviously not having to alert users to a possibly breaking change
  • Not having to rewrite hpgsql-simple-compat because the new API is too much of a mismatch for what postgresql-simple offers. We might have to write a low-level API wrapper before we merge the other PR.

So cargo and rustc aren't necessary for the development shell
This is the prize I was looking for.

Now the row decoders are built with the NULL handling parts a lot more
inlined, which even means in a fully inlined row decoder we no longer
box into a `Maybe a` to then case match on it and fail on `Nothing`,
when the target record has a field typed as `a` (not a Maybe).
Types like `Scientific` are not being decoded optimally otherwise, and
they can do better than in the current state
The rewrite rules for these weren't really being tested be for
`FromPgField (Maybe a)` instances, and this shows that clearly
@mzabani
mzabani force-pushed the backpatch-row-decs-pinned-byte-arrays branch from 5d2024d to e0e7ec5 Compare September 13, 2026 14:21
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.

1 participant