kndndrj / nvim-dbee

Interactive database client for neovim
GNU General Public License v3.0
755 stars 51 forks source link

PostgreSQL commands not working #87

Closed Defuse4045 closed 5 months ago

Defuse4045 commented 7 months ago

psql commands such as the one used to describe a table fail to execute with a syntax error. image In comparison, they work with other plugins such as vim-dadbod & vim-dadbod-ui image

MattiasMTS commented 7 months ago

This fails presumably because the backend is using https://pkg.go.dev/database/sql under the hood, compared to vim-dadbod, which uses psql cli under the hood.

If you want to describe a table you could make use of the "helpers" by hitting "enter" on the table you want to describe. For postgres, you have the following helpers: https://github.com/kndndrj/nvim-dbee/blob/master/dbee/adapters/postgres.go#L69-L87

willruggiano commented 7 months ago

Not that it addresses your situation exactly, but I recently discovered pgddl which I added as an extra helper in my personal configuration which lets me generate DDL scripts for database objects. I use it just for CREATE scripts, but the extension can generate DROP scripts as well as scripts that include the entire dependency tree.

kndndrj commented 5 months ago

As @MattiasMTS said - we are using a different backend - therefore this is not a bug. Closing.