Skip to content

$maxgte emits a function that does not exist#69

Merged
roed314 merged 1 commit into
roed314:masterfrom
roed-math:fix/maxgte
Jul 20, 2026
Merged

$maxgte emits a function that does not exist#69
roed314 merged 1 commit into
roed314:masterfrom
roed-math:fix/maxgte

Conversation

@roed-math

Copy link
Copy Markdown

$maxgte emitted array_max(col) >= %s. That function is a custom definition on the LMFDB's own servers — where it is defined as exactly SELECT max(x) FROM unnest($1), IMMUTABLE, with zero functional indexes on it (checked on the production mirror) — and does not exist on a stock PostgreSQL, so the documented operator failed with UndefinedFunction everywhere else. The subquery is now emitted inline, which the planner treats identically on LMFDB and works on every database with no DDL.


Split out of #60 (one PR per issue). This branch carries only this issue's fix and its tests; the rest of the known-bug inventory stays xfailed, so the full suite is green here and the strict markers guarantee no cross-issue leakage.

$maxgte emitted array_max(col) >= %s. That function is a custom definition on the LMFDB's own servers — where it is defined as exactly SELECT max(x) FROM unnest($1), IMMUTABLE, with zero functional indexes on it (checked on the production mirror) — and does not exist on a stock PostgreSQL, so the documented operator failed with UndefinedFunction everywhere else. The subquery is now emitted inline, which the planner treats identically on LMFDB and works on every database with no DDL.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@roed314
roed314 merged commit a72518c into roed314:master Jul 20, 2026
16 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.

2 participants