vim-dadbod
vim-dadbod copied to clipboard
SET Session as READONLY on connect
Hello,
I am using postgres as my connection. What is the recommendation on setting a session as readonly by default? This is a safeguard that I want by default. I want to opt out of readonly when I want to modify data. Is there an autocmd I can use to run something after connect? https://stackoverflow.com/questions/41960217/connecting-to-postgres-database-with-read-only-access - a few options are listed here on how to set as readonly. I believe the psqlrc is ignored when connecting. Thanks!
I believe the psqlrc is ignored when connecting.
First things first, what does this mean? When is it ignored, and when isn't it?
https://github.com/tpope/vim-dadbod/blob/master/autoload/db/adapter/postgresql.vim
maybe I am looking at this file wrong. I see this flag, --no-psqlrc, passed in. Maybe line 13 is run when running a sql command
Yeah, --no-psqlrc is only for tab completing database and table names.