Skip to content

Recover the jsonb Jsonb and jsonpath JsonPath collapsed C types#20

Open
estebanzimanyi wants to merge 1 commit into
MobilityDB:masterfrom
estebanzimanyi:fix/recover-jsonb-jsonpath-types
Open

Recover the jsonb Jsonb and jsonpath JsonPath collapsed C types#20
estebanzimanyi wants to merge 1 commit into
MobilityDB:masterfrom
estebanzimanyi:fix/recover-jsonb-jsonpath-types

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

libclang collapses the PG-vendored Jsonb (struct JsonbPair) and JsonPath (struct JsonPathParseItem) pointer types to int during header parsing — the same mechanism already handled for GSERIALIZED/GBOX/Interval/DateADT in #15. Add both to the type-recovery map so the temporal-JSONB (tjsonb) and jsonbset functions carry their real Jsonb*/JsonPath* signatures in the generated IDL that every binding consumes.

Verified by regenerating the catalog at the latest pin: jsonb_in/jsonb_out, tjsonb_start_value, jsonbset_start_value now carry Jsonb* instead of int/int*. Without this, catalog-driven bindings see a scalar where JMEOS exposes a Pointer and either drop the function or miscompile.

libclang collapses the PG-vendored Jsonb (struct JsonbPair) and JsonPath
(struct JsonPathParseItem) pointer types to int during header parsing, the
same mechanism already handled for GSERIALIZED/GBOX/Interval/DateADT. Add both
to the type-recovery map so the temporal-JSONB (tjsonb) and jsonbset functions
carry their real Jsonb*/JsonPath* signatures in the generated IDL that every
binding consumes (verified: jsonbset_value_n result recovers to Jsonb**).
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