Comments (15)
Does it happen only with AWS RDS or also with a local database?
How are you adding a connection, through the "Add connections", env variable, vim variable, or something else?
It works for me locally when I connect to a docker db.
Is the URL you provided just an example how the URL looks? It points to localhost, and you are mentioning that there is an issue with RDS.
from vim-dadbod-ui.
- It also happens with a local database launched with docker
- I'm adding the connection through the "Add connections" option in the sidebar
- The url is exactly what I use besides the actual password, I'm opening a local SSH tunnel to connect to the target AWS RDS postgres instance because it runs in a private subnet
- The special characters in the password are
$
and also+
, vim-dadbod works by escaping only$
I'm just starting with the plugin so I didn't know there were other means for providing the connection, I'll take a look to see if those work
from vim-dadbod-ui.
I'm assuming that SSH tunnel is the issue. Did you try using https://github.com/pbogut/vim-dadbod-ssh ?
from vim-dadbod-ui.
Actually I use AWS session manager to establish the tunnel because the bastion server is not public, so is not an actual SSH connection but rather a command like this:
aws ssm start-session --target ${INSTANCE_ID} --document-name AWS-StartPortForwardingSessionToRemoteHost --parameters "{\"portNumber\":[\"${PORT}\"],\"localPortNumber\":[\"${L_PORT}\"],\"host\":[\"${HOST}\"]}"
However I wonder why it also fails for local postgres launched with docker
from vim-dadbod-ui.
Does everything work locally or on RDS when there is no $
in the password?
Also, what system are you using?
from vim-dadbod-ui.
Confirmed that it works locally when there is no $
in the password. I cannot change the RDS password though.
Vim version:
~/code % vim --version
VIM - Vi IMproved 9.1 (2024 Jan 02, compiled Apr 18 2024 20:05:12)
macOS version - arm64
Included patches: 1-350
Compiled by Homebrew
from vim-dadbod-ui.
Can you try applying this patch to your local vim-dadbod-ui
installation and try it again?
diff --git a/autoload/db_ui.vim b/autoload/db_ui.vim
index d944db7..419fd29 100644
--- a/autoload/db_ui.vim
+++ b/autoload/db_ui.vim
@@ -422,7 +422,7 @@ endfunction
" we don't want to do.
function db_ui#resolve(url) abort
let parsed_url = db#url#parse(a:url)
- let ignored_resolve_schemes = ['ssh']
+ let ignored_resolve_schemes = ['ssh', 'postgres', 'postgresql']
if index(ignored_resolve_schemes, get(parsed_url, 'scheme', '')) > -1
return a:url
If you added a connection through "Add connection", delete and re-add it.
from vim-dadbod-ui.
Cool, after adding that patch I was able to connect using the escaped password with $
from vim-dadbod-ui.
Ok, thanks for testing it. I'll fix it and let you know to give it another test.
from vim-dadbod-ui.
I pushed a change to master. Can you pull latest changes and see if it works?
from vim-dadbod-ui.
@kristijanhusak I am experiencing this issue as well with a #
in the DB connection string -- I'm on the most recent pull and it's giving me this when running :DBUI
:
Error executing Lua callback: .../share/nvim/lazy/lazy.nvim/lua/lazy/core/handler/cmd.lua:48: function db_ui#open[1]..<SNR>55_init[2]..4[25]..6[10]..7[35]..
17, line 6: Vim(if):E716: Key not present in Dictionary: "path !=? '/'"
from vim-dadbod-ui.
@wstewarttennes in which part of db connection string? Did it work before this change? Does vim-dadbod directly work?
from vim-dadbod-ui.
@kristijanhusak thanks for the quick reply, in the password field -- I have solved this by using %23
instead of the #
symbol in the password string (this can fixed for other special characters in a similar matter). I believe this is also present in vim-dadbod directly (I was able to reproduce error using the :DB
command). See this issue: tpope/vim-dadbod#103
from vim-dadbod-ui.
I confirm that the issue was fixed in the latest pull.
from vim-dadbod-ui.
Ok great, thanks!
from vim-dadbod-ui.
Related Issues (20)
- Are there any options for "edit current entry" when browsing the result of a query?
- Duplicate tag "ic"
- Move Buffer output dropdown to respective database
- Show connection string of database HOT 1
- Oracle database not opening up properly HOT 16
- bind parameter delimiter config HOT 2
- Change `search_path` for session duration?
- Feature Request: Change result buffer, save, propagate changes to db HOT 2
- Display relation description in dadbod-ui ? HOT 3
- JOIN not working with SQL Server HOT 2
- Table names truncated at 20 characters for oracle HOT 2
- <C-]> tries to go to auth.users
- Error connecting to db local:DB:'mysql'executable not found HOT 4
- Single row tables aren't getting printed out in MariaDB (same as MySQL but on Linux)
- List stored procedures and functions HOT 2
- No output for sqlserver
- Unable to connect to MSSQL server using vim-dadbod-ui HOT 4
- Oracle Schemas ORA-00904 "COMMON" Error HOT 1
- mysql encoding HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vim-dadbod-ui.