Skip to content

Fix aggregate deserial function signature#2354

Draft
eeeebbbbrrrr wants to merge 1 commit into
developfrom
fix/2351-aggregate-deserial-signature
Draft

Fix aggregate deserial function signature#2354
eeeebbbbrrrr wants to merge 1 commit into
developfrom
fix/2351-aggregate-deserial-signature

Conversation

@eeeebbbbrrrr

Copy link
Copy Markdown
Contributor

Summary

  • generate aggregate deserial functions with PostgreSQL's required (bytea, internal) -> internal signature
  • update Aggregate::deserial to mirror that contract without a spurious current-state argument or PgBox conversion
  • add macro-level and live PostgreSQL regression coverage for a parallel aggregate with internal state

Fixes #2351

Testing

  • cargo test -p pgrx-sql-entity-graph
  • cargo pgrx test pg18 aggregate_parallel_internal_deserial
  • cargo check -p pgrx --no-default-features --features pg18
  • cargo check -p pgrx-unit-tests --no-default-features --features pg18,pg_test
  • cargo check --manifest-path pgrx-examples/aggregate/Cargo.toml --no-default-features --features pg18
  • cargo clippy -p pgrx-sql-entity-graph -- -D warnings

Remove the spurious aggregate-state argument from generated deserial functions and model PostgreSQL's required (bytea, internal) -> internal contract directly in the Aggregate trait. Add macro and live PostgreSQL regression coverage.\n\nFixes #2351
@eeeebbbbrrrr
eeeebbbbrrrr marked this pull request as draft July 13, 2026 17:54
@eeeebbbbrrrr

Copy link
Copy Markdown
Contributor Author

I am not sure that the attempt here is actually correct or in the spirit of pgrx. Having a function signature that takes Internal as an argument I believe is incorrect for this API. I need to study this more.

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.

BUG: [pg_aggregate] with parallel aggregation and internal types generates wrong functions

1 participant