Skip to content

Read the alternative names of a wrapper declared inline - #198

Merged
estebanzimanyi merged 1 commit into
MobilityDB:masterfrom
estebanzimanyi:parser/altsqlfn-qualified-wrapper
Oct 18, 2026
Merged

estebanzimanyi merged 1 commit into
MobilityDB:masterfrom
estebanzimanyi:parser/altsqlfn-qualified-wrapper

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

parser/altsqlfn.py reads the @altsqlfn of a PostgreSQL wrapper from the doxygen block right
before its Datum Name(PG_FUNCTION_ARGS), and takes the wrapper declared inline or static
as well, as the #_DATUM pattern of parser/sqlfn.py reads it. MobilityDB declares 753 of its
wrappers inline Datum, among them Tnumber_wavg_transfn, the transition of wAvg.

Witness: over MobilityDB branch sql/wavg-engine-name, which states @altsqlfn wAvgAgg() on
Tnumber_wavg_transfn, the catalog gives the three wAvg entries altSqlName wAvgAgg, where the
pattern that wants Datum right after the block gives them none.

Measured: over that branch the catalog differs from the one master's parser derives in those
three aggregate entries alone, 157 aggregate entries carrying an altSqlName against 154, no
function differing; over MobilityDB fa02361fa6 it is byte for byte the catalog master's parser
derives. tests/test_altsqlfn.py states an inline transition and a static inline scalar
wrapper, a test that fails on master's parser. The suite runs 561 tests with the same three
failures as master (test_family, test_struct_layout twice).

Why: an engine reads the name it registers from altSqlName, so a tag the parser does not read
leaves the engine on a name it cannot hold.

parser/altsqlfn.py reads the @altsqlfn of a PostgreSQL wrapper from the doxygen block right
before its `Datum Name(PG_FUNCTION_ARGS)`, and takes the wrapper declared `inline` or `static`
as well, as the #_DATUM pattern of parser/sqlfn.py reads it. MobilityDB declares 753 of its
wrappers `inline Datum`, among them Tnumber_wavg_transfn, the transition of wAvg.

Witness: over MobilityDB branch sql/wavg-engine-name, which states `@altsqlfn wAvgAgg()` on
Tnumber_wavg_transfn, the catalog gives the three wAvg entries altSqlName wAvgAgg, where the
pattern that wants `Datum` right after the block gives them none.

Measured: over that branch the catalog differs from the one master's parser derives in those
three aggregate entries alone, 157 aggregate entries carrying an altSqlName against 154, no
function differing; over MobilityDB fa02361fa6 it is byte for byte the catalog master's parser
derives. tests/test_altsqlfn.py states an `inline` transition and a `static inline` scalar
wrapper, a test that fails on master's parser. The suite runs 561 tests with the same three
failures as master (test_family, test_struct_layout twice).

Why: an engine reads the name it registers from altSqlName, so a tag the parser does not read
leaves the engine on a name it cannot hold.
@estebanzimanyi
estebanzimanyi merged commit 1008ba1 into MobilityDB:master Oct 18, 2026
3 checks passed
@estebanzimanyi
estebanzimanyi deleted the parser/altsqlfn-qualified-wrapper branch October 18, 2026 11:32
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