Carry the full per-type SQL name family in sqlSignatures#56
Merged
estebanzimanyi merged 1 commit intoJul 15, 2026
Merged
Conversation
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.
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.
What
A base-type-generic MEOS C function is exposed by MobilityDB as a per-type name family.
tintInst,tbigintInst, …,ttextInstare 15 distinctCREATE FUNCTIONs all backed by the one wrapperTemporal_to_tinstant; the same holds for the sequence / sequence-set constructors, the_in/_out/_recv/_sendandFrom{Binary,HexWKB,MFJSON}I/O families, the value accessors, and the transform families.The single
@sqlfndoxygen tag names only one representative of each family, sosqlSignaturescarries just that name's overload (e.g.temporal_to_tinstant→ onlytintInst(tint)). Every binding therefore generates one type and hand-writes the other 14.Change
attach_sqlfn_mapkeeps everyCREATE FUNCTIONoverload the wrapper backs and stamps each entry with its ownsqlNamewhen 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
temporal_to_tinstant1→15,tsequence_make1→17,set_in/set_out1→16, span I/O 0→5, and alias pairs are surfaced (insert/update,atValue/atValues,contains/set_contains,minDistance/nearestApproachDistance).sqlArity/sqlReturnTypeAllalready span the whole wrapper, sosqlSignaturesis now consistent with them.