microsoft / vscode-postgresql

PostgreSQL extension for VSCODE
Other
422 stars 53 forks source link

user, password and dbname from settings.json is ignored #21

Closed janhapke closed 5 years ago

janhapke commented 5 years ago

Steps to Reproduce:

  1. settings.json
    {
    "window.zoomLevel": -1,
    "pgsql.connections": [
        {
            "host": "localhost",
            "port": "54321",
            "dbname": "my_db",
            "user": "postgres",
            "password": "password",
            "emptyPasswordInput": false,
            "profileName": "My DB"
        }
    ]
    }
  2. Command Palette > PostgreSQL: New Query
  3. Select Connection Profile

I am asked to enter the username and then the password (although both is specified in settings.json)

When I try to run a query, I get an error saying that relation "mytable" does not exist.

I try to list the tables and it appears I am not connected to the correct database (even though the name is specified in settings.json as well).

akamath46297 commented 5 years ago

@janhapke this is now fixed for Dbname and user name with Release 0.2.0

For security purposes we have not handled this for password. We are looking into ways where we can store the password in some cred store so that it is secure

akamath46297 commented 5 years ago

Opened a separate enhancement for handling password #35