Has anyone successfully configured a postgres database in vim's dbext ?

I see only configurations for mysql or sqllite.

I included the following code in .vimrc:

 let g:dbext_default_profile_mydb='type=pgsql:user=mydb:mydb=localhost:dsnname=mydb:dbname=mydb'
 let g:dbext_default_profile='mydb'

mydb is the database, role, username and password for my database.

when I list connections I got this error:

dbext:Unknown parameter: POSTGRESQL_bin
dbext:Unknown parameter: POSTGRESQL_cmd_header
dbext:Unknown parameter: POSTGRESQL_cmd_terminator
dbext:Unknown parameter: POSTGRESQL_cmd_options
dbext:Unknown parameter: POSTGRESQL_on_error
dbext:Unknown parameter: utilities
dbext:Unknown parameter: POSTGRESQL_cmd_terminator
dbext:A valid database type must be chosen    

can anyone show me the correct line to put in .vimrc for accessing a postgresql database with dbext please ?

if I use DBPromptForBufferParameters command it works ok.


This is the correct configuration for using postgres with dbext. Put these lines in your .vim

 let g:dbext_default_profile_myDB='type=pgsql:host=localhost:user=myUser:dsnname=myDB:dbname=myDB:passwd=myPassword'
 let g:dbext_default_profile='myDB'

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.