Skip to content

Carry the full per-type SQL name family in sqlSignatures#56

Merged
estebanzimanyi merged 1 commit into
MobilityDB:masterfrom
estebanzimanyi:feat/sqlsignatures-name-family
Jul 15, 2026
Merged

Carry the full per-type SQL name family in sqlSignatures#56
estebanzimanyi merged 1 commit into
MobilityDB:masterfrom
estebanzimanyi:feat/sqlsignatures-name-family

Conversation

@estebanzimanyi

Copy link
Copy Markdown
Member

What

A base-type-generic MEOS C function is exposed by MobilityDB as a per-type name family. tintInst, tbigintInst, …, ttextInst are 15 distinct CREATE FUNCTIONs all backed by the one wrapper Temporal_to_tinstant; the same holds for the sequence / sequence-set constructors, the _in/_out/_recv/_send and From{Binary,HexWKB,MFJSON} I/O families, the value accessors, and the transform families.

The single @sqlfn doxygen tag names only one representative of each family, so sqlSignatures carries just that name's overload (e.g. temporal_to_tinstant → only tintInst(tint)). Every binding therefore generates one type and hand-writes the other 14.

Change

attach_sqlfn_map keeps every CREATE FUNCTION overload the wrapper backs and stamps each entry with its own sqlName when the wrapper backs more than one distinct name. Single-name wrappers stay {args, ret} unchanged, so the common case is a no-op.

A binding registers each overload by sig.get("sqlName", f["sqlfn"]) — its own SQL name — instead of hand-writing the non-representative types.

Effect on the catalog

  • 241 functions gain their full name family; none lose signatures; the ~2060 single-name functions are byte-identical.
  • temporal_to_tinstant 1→15, tsequence_make 1→17, set_in/set_out 1→16, span I/O 0→5, and alias pairs are surfaced (insert/update, atValue/atValues, contains/set_contains, minDistance/nearestApproachDistance).
  • sqlArity/sqlReturnTypeAll already span the whole wrapper, so sqlSignatures is now consistent with them.

A base-type-generic MEOS C function is exposed by MobilityDB as a per-type
NAME FAMILY: tintInst, tbigintInst, ..., ttextInst are distinct CREATE
FUNCTIONs all backed by the one wrapper Temporal_to_tinstant, and likewise
the sequence/sequence-set constructors, the _in/_out/_recv/_send and
From{Binary,HexWKB,MFJSON} I/O families, and the value/transform families.
The single @sqlfn doxygen tag names only one representative, so sqlSignatures
kept just that name's overload and every binding had to hand-write the rest.

Keep every CREATE FUNCTION overload the wrapper backs and stamp each with its
own sqlName when the wrapper backs more than one distinct name; single-name
wrappers stay {args, ret} unchanged. A binding registers each overload by its
own SQL name (falling back to the function's sqlfn when no sqlName is present)
instead of hand-writing the non-representative types.
@estebanzimanyi estebanzimanyi merged commit c103913 into MobilityDB:master Jul 15, 2026
2 checks passed
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