kristijanhusak / vim-dadbod-ui

Simple UI for https://github.com/tpope/vim-dadbod
MIT License
1.54k stars 94 forks source link

Change `search_path` for session duration? #229

Open fmorroni opened 7 months ago

fmorroni commented 7 months ago

Hi, is it possible so set the search_path to a specific schema for the duration of a session? Or is there any other way to "connect" to a schema so all table names are relative to it?

My use case is that I have a .sql file with many queries and a set search_path to schema at the top. If I run the file as a whole it works fine, but when I try to run individual queries it fails because the search_path hasn't been permanently set and the tables aren't found.