vscode-postgres icon indicating copy to clipboard operation
vscode-postgres copied to clipboard

Connection options lost when reopening unstored query after restart of VS Code

Open LinqLover opened this issue 4 years ago • 2 comments

Steps to reproduce

  1. PostgreSQL: New query
  2. PostgreSQL: Selection connection ... Choose Postgres server + database
  3. Enter your query
  4. Developer: Reload Window

Expected behavior

Query can be run again without further configuration.

Actual behavior

"No PostgreSQL Server or Database selected". You need to choose Postgres server + database again.

Would be nice if this extension could memorize these settings per query. I often restart my editor.

LinqLover avatar Jun 15 '20 13:06 LinqLover

This is possible by setting the default connection and default database in the extension settings.

bfelbo avatar Dec 02 '21 21:12 bfelbo

sort of - that only really works if the query originally used the default connection - if the user changed the server/database before closing - it would reset to the defaults.

as you switch query tabs it does in fact remember the setting per query... however getting that to persist through a reload would be tricky...

Borvik avatar Dec 03 '21 03:12 Borvik