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

Unable to change default schema in database connection #1069

Open
thomasroordaGiG opened this issue Dec 28, 2022 · 3 comments
Open

Unable to change default schema in database connection #1069

thomasroordaGiG opened this issue Dec 28, 2022 · 3 comments
Labels
feature request New issue opened using "Feature request" template pg PostgreSQL driver

Comments

@thomasroordaGiG
Copy link

Hi all,

I have just installed this extension, and connected to our database succesfully. However, for the SQL scripts to work, I need to connect to a specific schema within the database connection. Currently, the execution throws the error of ¨relation ´x´ does not exist.¨ I am using the newest version of Visual Code and SQLTools, and I am using PostgreSQL. It seems to default to the public schema, but I need to have the vcs schema connected to by default, see image. This is where the tables are located that I want to use. Can anyone point me to where I can change this setting?

image

Kind regards,
Thomas

@gjsjohnmurray gjsjohnmurray added the pg PostgreSQL driver label Jan 6, 2023
@gjsjohnmurray
Copy link
Collaborator

Can you use the SET search_path TO vcs syntax described in docs here?

@thomasroordaGiG
Copy link
Author

@gjsjohnmurray Thanks for the reply. This does work, however I was looking for a way to configure VSCode to do this. I guess that is not a possibility? I used to work with dbeaver, which does have this functionality.

@gjsjohnmurray gjsjohnmurray added the feature request New issue opened using "Feature request" template label Jan 12, 2023
@gjsjohnmurray
Copy link
Collaborator

The PostgreSQL driver would need enhancing to do this. I have added the 'feature request' label but can't promise it will be implemented.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New issue opened using "Feature request" template pg PostgreSQL driver
Projects
None yet
Development

No branches or pull requests

2 participants