Read a wrapper's call to the pg_ twin of a function as a call to it - #175
Open
estebanzimanyi wants to merge 1 commit into
Open
estebanzimanyi wants to merge 1 commit into
estebanzimanyi wants to merge 1 commit into
Conversation
A function MEOS takes from PostgreSQL is public under PostgreSQL's name only in MEOS, where it calls its pg_ twin, which takes the same parameters in the same order; the extension, which links PostgreSQL's own function of that name, calls the twin. The bound arguments a wrapper passes are read from its call to the function or to its pg_ twin, so Jsonb_path_exists_common calling pg_jsonb_path_exists(jb, jp, vars, silent, tz) binds tz for jsonb_path_exists: jsonbPathExists passes false and jsonbPathExistsTz true. PgTwinTests reads both wrappers of one helper, and a helper calling another function binds nothing. Witness: over MobilityDB 2d13c5c42d the catalog states jsonbPathExists and jsonbPathExistsTz with no boundArgs, so their two signatures cannot be told apart and a binding cannot pass tz; the JMEOS generators leave the path functions over jsonb out on an argument count, four SQL arguments for five C parameters. Measured: over MobilityDB 2d13c5c42d, 12 signatures of 6 functions carry boundArgs, tz false and true for jsonb_path_exists, jsonb_path_match, jsonb_path_query_all, jsonb_path_query_array and jsonb_path_query_first, any true for jsonbExistsAny and false for jsonbExistsAll; no other entry of the catalog differs. The catalog holds 216 functions with a pg_ twin, 213 with the same parameters and 3 whose parameters differ in name alone (json_make, float4_cmp, float8_cmp), and a twin binds by position. The suite passes, 473 tests; against the parser of master PgTwinTests' twin test fails.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A function MEOS takes from PostgreSQL is public under PostgreSQL's name only in MEOS, where it
calls its pg_ twin, which takes the same parameters in the same order; the extension, which
links PostgreSQL's own function of that name, calls the twin. The bound arguments a wrapper
passes are read from its call to the function or to its pg_ twin, so Jsonb_path_exists_common
calling pg_jsonb_path_exists(jb, jp, vars, silent, tz) binds tz for jsonb_path_exists:
jsonbPathExists passes false and jsonbPathExistsTz true. PgTwinTests reads both wrappers of one
helper, and a helper calling another function binds nothing.
Witness: over MobilityDB 2d13c5c42d the catalog states jsonbPathExists and jsonbPathExistsTz
with no boundArgs, so their two signatures cannot be told apart and a binding cannot pass tz;
the JMEOS generators leave the path functions over jsonb out on an argument count, four SQL
arguments for five C parameters.
Measured: over MobilityDB 2d13c5c42d, 12 signatures of 6 functions carry boundArgs, tz false
and true for jsonb_path_exists, jsonb_path_match, jsonb_path_query_all, jsonb_path_query_array
and jsonb_path_query_first, any true for jsonbExistsAny and false for jsonbExistsAll; no other
entry of the catalog differs. The catalog holds 216 functions with a pg_ twin, 213 with the same
parameters and 3 whose parameters differ in name alone (json_make, float4_cmp, float8_cmp), and
a twin binds by position. The suite passes, 473 tests; against the parser of master
PgTwinTests' twin test fails.