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

Use and respect the passfile connection parameter #1129

Merged
merged 2 commits into from
Jul 7, 2023

Commits on Jun 9, 2023

  1. Use and respect the passfile connection parameter

    The postgres documentation[1] regarding the password file, states
    that:
    
    password file to use can be specified using the connection parameter
    passfile or the environment variable PGPASSFILE.
    
    The current implementation of lib/pq only respects the environment
    variable PGPASSFILE. This is not correct, but also limiting, as
    the PGPASSFILE is global and we might want to use different files
    for different clients in the same program.
    
    Fixing that is easy, by just checking the parameter passfile first,
    and if not, pull the value from PGPASSFILE.
    
    [1] https://www.postgresql.org/docs/current/libpq-pgpass.html
    keymon committed Jun 9, 2023
    Configuration menu
    Copy the full SHA
    29f3a40 View commit details
    Browse the repository at this point in the history

Commits on Jun 28, 2023

  1. Move parse of PGPASSFILE to parseEnviron

    Now the connection only checks the parameter passfile, that
    is populated by parseEnviron.
    
    Refactored the test for this
    keymon committed Jun 28, 2023
    Configuration menu
    Copy the full SHA
    eb3a56e View commit details
    Browse the repository at this point in the history