Repository navigation
State a literal a C wrapper passes as a value operand of its composition - #181
Merged
estebanzimanyi merged 1 commit intoOct 9, 2026
Conversation
A C wrapper that casts an argument before its call and passes a C literal for a parameter the SQL signature does not carry states that parameter as a value operand: eDwithin(tpose, geometry, float), whose wrapper Edwithin_tpose_geo casts with tpoint = tpose_to_tpoint(temp) and calls edwithin_tgeo_geo(tpoint, gs, dist, true), is the composition of operand 0 through tpose_to_tpoint, operands 1 and 2 as they are, and the value true for spheroid, the operand form A7 states for a value a SQL body binds. A literal is true, false or a number. Witness: on MobilityDB master 2334c439ab edwithin_tgeo_geo, edwithin_geo_tgeo and edwithin_tgeo_tgeo take a spheroid flag the SQL eDwithin over tpose does not carry, so a tpose wrapper calling them passes true; master's attach_wrapper_compositions finds no SQL argument for the literal, leaves the three signatures eDwithin(geometry, tpose, float), eDwithin(tpose, geometry, float) and eDwithin(tpose, tpose, float) among the sqlSignatures of those functions, and a binding passes them a tpose they refuse. Measured: over a MobilityDB tree on master 2334c439ab whose six tpose wrappers call the public tgeo functions, run.py states 6 tpose compositions, the three eDwithin with the value true for spheroid, and no tpose signature on the tgeo functions; master's parser over the same tree states 3 and leaves the three eDwithin signatures on the tgeo functions. Over MobilityDB master 2334c439ab every key of the catalog equals that of master's parser. The suite passes the new test tests/test_compositions.py test_a_literal_argument_is_a_value_operand, which fails with master's parser, with 484 passed and 25 skipped against 483 and 25 with master's parser, the same three struct and family tests failing in both over a catalog generated from the source headers. Why: a binding reaches a relationship of a derived type through the cast and the function of its cast target with every parameter that function reads bound, as PostgreSQL's wrapper binds it.
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 C wrapper that casts an argument before its call and passes a C literal for a parameter the SQL
signature does not carry states that parameter as a value operand: eDwithin(tpose, geometry,
float), whose wrapper Edwithin_tpose_geo casts with tpoint = tpose_to_tpoint(temp) and calls
edwithin_tgeo_geo(tpoint, gs, dist, true), is the composition of operand 0 through
tpose_to_tpoint, operands 1 and 2 as they are, and the value true for spheroid, the operand form
A7 states for a value a SQL body binds. A literal is true, false or a number.
Witness: on MobilityDB master 2334c439ab edwithin_tgeo_geo, edwithin_geo_tgeo and
edwithin_tgeo_tgeo take a spheroid flag the SQL eDwithin over tpose does not carry, so a tpose
wrapper calling them passes true; master's attach_wrapper_compositions finds no SQL argument for
the literal, leaves the three signatures eDwithin(geometry, tpose, float), eDwithin(tpose,
geometry, float) and eDwithin(tpose, tpose, float) among the sqlSignatures of those functions,
and a binding passes them a tpose they refuse.
Measured: over a MobilityDB tree on master 2334c439ab whose six tpose wrappers call the public
tgeo functions, run.py states 6 tpose compositions, the three eDwithin with the value true for
spheroid, and no tpose signature on the tgeo functions; master's parser over the same tree states
3 and leaves the three eDwithin signatures on the tgeo functions. Over MobilityDB master
2334c439ab every key of the catalog equals that of master's parser. The suite passes the new test
tests/test_compositions.py test_a_literal_argument_is_a_value_operand, which fails with master's
parser, with 484 passed and 25 skipped against 483 and 25 with master's parser, the same three
struct and family tests failing in both over a catalog generated from the source headers.
Why: a binding reaches a relationship of a derived type through the cast and the function of its
cast target with every parameter that function reads bound, as PostgreSQL's wrapper binds it.