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

Adding strict to example aggregation causes invalid extension SQL #639

Closed
willmurnane opened this issue Aug 18, 2022 · 1 comment · Fixed by #751
Closed

Adding strict to example aggregation causes invalid extension SQL #639

willmurnane opened this issue Aug 18, 2022 · 1 comment · Fixed by #751
Labels
confusing This doesn't seem right fixed-by:0.5.0

Comments

@willmurnane
Copy link
Contributor

willmurnane commented Aug 18, 2022

Adding strict to line 78 of the example aggregation made the generated SQL:

...
-- pgx-examples/aggregate/src/lib.rs:72
-- aggregate::integer_avg_state_state
CREATE FUNCTION "integer_avg_state_state"(
	"this" IntegerAvgState, /* pgx::datum::varlena::PgVarlena<aggregate::IntegerAvgState> */
	"value" integer /* core::option::Option<i32> */
) RETURNS IntegerAvgState /* pgx::datum::varlena::PgVarlena<aggregate::IntegerAvgState> */
PARALLEL SAFE IMMUTABLE STRICT STRICT
--                      ^^^ oops
LANGUAGE c /* Rust */
AS 'MODULE_PATHNAME', 'integer_avg_state_state_wrapper';
@willmurnane
Copy link
Contributor Author

Fixed by #640.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
confusing This doesn't seem right fixed-by:0.5.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants