Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix #70: Respect PG* environment variables #107

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

fgrsnau
Copy link

@fgrsnau fgrsnau commented Nov 16, 2019

This PR should fix #70. The change is rather simple, because this is already the default behaviour of the postgres driver when the connection string is empty.

The database and sslmodel options are now handled implicitely.
If options are not specified in the connection string, the postgres
driver will pick the corresponding environment variables.

Therefore this commit changes the default connection string to the empty
string.

This commit fixes nnev#70.
Setting the argument is not necessary anymore, because the default
values are taken from the environment.
@fgrsnau
Copy link
Author

fgrsnau commented Nov 16, 2019

Note that this PR does not only change the default connect string for the termine tool, but also for the other binaries. This might clash with your deployment.

There are some systemd service files in the repo. Either the environment variables (PGHOST should be default, so PGDATABASE should be enough) should be set, or a correct -connect argument should be specified.

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.

update -connect flag to respect the PGUSER and PGPASS environment variables
1 participant