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

Choose a connection in an SQL file (configuration by comment)

Open Eccenux opened this issue 1 year ago • 0 comments

Would be very useful to have an ability to define what is the default connection / database for a given file.

I have a lot of SQL files some of which work on a specific database. Utility scripts for testing and debugging.

So maybe the extension could read some comment like this:

/*
{
"vscode-postgres.defaultConnection": "dev",
"vscode-postgres.defaultDatabase": "bus_library",
}
*/

Connection might be optional (defaults to workspace default):

/*
{
"vscode-postgres.defaultDatabase": "test_claims",
}
*/

Eccenux avatar Nov 29 '23 10:11 Eccenux