Skip to content

fix: add VERSION to builtin function completion#1574

Open
devadathanmb wants to merge 3 commits intodbcli:mainfrom
devadathanmb:fix/version-autocomplete
Open

fix: add VERSION to builtin function completion#1574
devadathanmb wants to merge 3 commits intodbcli:mainfrom
devadathanmb:fix/version-autocomplete

Conversation

@devadathanmb
Copy link
Copy Markdown
Contributor

@devadathanmb devadathanmb commented Apr 11, 2026

Description

Adds VERSION to pgcli's builtin function completion list so SELECT VERSION(); is suggested during autocompletion.

Closes #1510

Screenshots

Before:

image

After:

image

Checklist

  • I've added this contribution to the changelog.rst.
  • I've added my name to the AUTHORS file (or it's already there).
  • I installed pre-commit hooks (pip install pre-commit && pre-commit install).
  • I verified that my changes work as expected (this may include manually testing them in your local environment, or in other available environments). Cross this out if not relevant (for example, if you're making a documentation change).
  • Please squash merge this pull request (uncheck if you'd like us to merge as multiple commits)

@devadathanmb devadathanmb marked this pull request as ready for review April 11, 2026 17:17
Copilot AI review requested due to automatic review settings April 11, 2026 17:17
@devadathanmb devadathanmb changed the title fix: add VERSION to builtin function completion fix: add VERSION to builtin function completion Apr 11, 2026
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds the PostgreSQL built-in VERSION function to pgcli’s function completion list so SELECT VERSION(); is suggested during autocompletion (closes #1510).

Changes:

  • Add VERSION to the built-in functions literals list.
  • Add smart- and naive-completion test coverage for VERSION suggestions.
  • Document the fix in the changelog.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
tests/test_smart_completion_public_schema_only.py Adds a smart-completion regression test ensuring VERSION is suggested for SELECT VE.
tests/test_naive_completion.py Adds a naive-completion regression test ensuring VERSION is suggested for SELECT VE.
pgcli/packages/pgliterals/pgliterals.json Adds VERSION to the built-in functions literal list used by the completer.
changelog.rst Notes the bug fix in the “Upcoming (TBD)” section.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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.

version() function is not appear in autocompletion

2 participants