Repository navigation
Conversation
This branch has not been deployed
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.
Add
--env-file PATHso a project can connect withpgcli --env-file .envorpgcli --env-file .env.local --ping, without extracting its URL in the shell. Fixes #1433.Read the first non-empty
DATABASE_URL,DATABASE_URI,DB_URL, orDB_URIusing python-dotenv. Only the requested file is read, variable references stay literal, and no file settings are exported into the process environment. Missing or invalid URLs produce a Click error without printing credentials, and the file URL is redacted from the launch log.Explicit connection arguments select the existing connection path instead of the file. Otherwise the file URL takes precedence over
PGDATABASEandDSN; normal libpq defaults still apply to the URL. The existing URI connection path handles SSH tunneling, listing, pinging, and command execution. Document this behavior and add Bash completion. Raise the Click minimum to 8.0 forContext.get_parameter_source(), which distinguishes command-line arguments from environment defaults.Validation:
git diff --checkpass..env.localsmoke checks pass for--ping,--list, and SQL execution with conflicting environment defaults.test_edit_named_queryandtest_pgcompleter_alias_uses_configured_alias_map).Upstream workflow status: the pgcli and CodeQL runs currently require maintainer approval before any jobs run. Codex Review stopped before reviewing the patch because its action requires the triggering actor to have write access to this repository. These workflow permission gates require maintainer action; the local validation above completed successfully.