Skip to content

Database management commands fail if PGDATABASE set in environment #75

@fiadliel

Description

@fiadliel

I'm not sure if you want to ascribe this as "fix your environment", but if PGDATABASE is set in the environment (to anything other than postgres), the database creation commands fail, as psql connects to a database that doesn't exist.

Error: Command error: stdout=; stderr=psql: error: connection to server at "localhost" (::1), port 58453 failed: FATAL:  database "xxx" does not exist

One option might be to explicitly set the database to postgres when running database management commands.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions