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

Fallback with standard PG prefixed env vars #78

Closed
mehcode opened this issue Jan 20, 2020 · 5 comments
Closed

Fallback with standard PG prefixed env vars #78

mehcode opened this issue Jan 20, 2020 · 5 comments
Labels
blocked db:postgres Related to PostgreSQL enhancement New feature or request

Comments

@mehcode
Copy link
Member

mehcode commented Jan 20, 2020

Ones that make the most sense to me:

  • PGHOST
  • PGPORT
  • PGUSER
  • PGPASSWORD
  • PGPASSFILE
  • PGDATABASE
@mehcode mehcode added enhancement New feature or request good first issue Good for newcomers db:postgres Related to PostgreSQL labels Jan 20, 2020
@tim-harding
Copy link
Contributor

Digging into the linked lines in connection.rs a bit, I see that replacing the username and password being printed as part of the startup message would be pretty easy. However, the host, port, user, password, and database are all part of Url and accessed though MaybeTlsStream. These are outside the Postgres module, so it wouldn't make sense to add Postgres-specific defaults there. On the other hand, I don't see any way to modify the contents of Url in PgConnection::establish before it's passed to MaybeTlsStream::connect, short of recreating the url as a string and converting it back with .into(). Any suggestions on a better approach?

@abonander
Copy link
Collaborator

I feel like this issue should probably be merged with #39.

@tim-harding
Copy link
Contributor

Continue the discussion there or here? I'd say the other thread definitely gives a clearer idea of where to start with the problem. Seems like a fun problem to take on.

@mehcode
Copy link
Member Author

mehcode commented Apr 8, 2020

Marking this as blocked by figuring out #174

@mehcode
Copy link
Member Author

mehcode commented Apr 25, 2020

#174 has been figured out on develop and this particularly has landed on develop

@mehcode mehcode closed this as completed Apr 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked db:postgres Related to PostgreSQL enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants