Skip to content

Support function signatures in \ef - #1673

Open
Boulea7 wants to merge 1 commit into
dbcli:mainfrom
Boulea7:fix/editor-function-signatures
Open

Boulea7 wants to merge 1 commit into
dbcli:mainfrom
Boulea7:fix/editor-function-signatures

Conversation

@Boulea7

@Boulea7 Boulea7 commented Dec 3, 2026

Copy link
Copy Markdown

Description

\ef public.example(integer) and \ef public.example(text, double precision) now open the definitions of the corresponding overloads. The editor command reads the full selector and asks PostgreSQL to resolve explicit argument types. Unique bare names still work. An ambiguous bare name displays PostgreSQL's diagnostic and returns to the prompt.

Fixes #1672. The original editor implementation is in #886. This change uses the existing error recovery from #1648.

Verified against PostgreSQL 18.7 with an editor that checked the actual SQL file. The terminal tests covered both overloads, a unique name, ambiguous and missing names, and ROLLBACK after a failed lookup. pytest tests passed 2,814 tests with one expected failure. Ruff 0.14.10 and the changelog check passed.

Checklist

  • Searched existing issues and pull requests and linked the relevant ones above.
  • Updated changelog.rst and AUTHORS.
  • Installed pre-commit hooks. Ran the pinned Ruff commands directly in the isolated checkout.
  • Verified the change with real PostgreSQL and CLI tests.
  • Please squash merge this pull request.

OpenAI Codex assisted with investigation, implementation, and testing.

This branch has not been deployed

No deployments
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.

\ef cannot select overloaded functions by signature

1 participant