tpope / vim-dadbod

dadbod.vim: Modern database interface for Vim
https://www.vim.org/scripts/script.php?script_id=5665
3.75k stars 132 forks source link

Not an issue but a question #108

Closed jtw023 closed 2 years ago

jtw023 commented 2 years ago

Does this project have support for Amazon Redshift? Redshift is based on PostgreSQL so I thought it might, however, I get the error "No adapter for jdbc.redshift". Does that mean it's not supported or did I just try to set it up wrong?

2022-05-02_12-26

tpope commented 2 years ago

It doesn't have support for jdbc.redshift URLs. If you convert it to a postgresql:// URL it should work fine, at least to the extent psql works fine with Redshift.

Support for jdbc.redshift URLs could possibly be added, depending on what they look like exactly.

jtw023 commented 2 years ago

I would have no idea where to start to implement that driver on my own so I've gathered what I think is the relevant information for anyone who would like to implement this and have highlighted an actual example on the screenshots. Side note, I had this hooked up with sql workbench/j. Not sure if they have an already implemented version that can be used for this purpose or not.

Meantime, I'm trying to convert my redshift driver to a postgres driver.

One thing to note is that my driver uses a format without the semicolons that the docs seem to show. jdbc:redshift://[Host]:[Port]/[Schema]?ssl=true&sslfactory=com.amazon.redshift.ssl.NonValidatingFactory

2022-05-03_09-48 2022-05-03_09-49

Here is the pdf document that the screenshots were taken from: https://s3.amazonaws.com/redshift-downloads/drivers/jdbc/1.2.55.1083/Amazon+Redshift+JDBC+Connector+Install+Guide.pdf

chunleng commented 2 years ago

Since CLI is mainly used to resolve the backend, one of the solution might be to use rsql provided by Amazon. Let me leave this link for anyone who saw this and want to take up on this https://docs.aws.amazon.com/redshift/latest/mgmt/rsql-query-tool.html