joereynolds / SQHell.vim

An SQL wrapper for vim
MIT License
131 stars 9 forks source link

Can't run multiple queries in psql #40

Closed misterbuckley closed 6 years ago

misterbuckley commented 6 years ago

When doing SQHExecute or SQHExecuteFile with multiple select statements, psql only returns results for the first query. This is a limitation in how psql itself handles the "-c" argument on the command line and the solution is to pass in commands with an echo and a pipe, a la echo "select * from user; select * from person;" | psql ... . I am currently working on a solution and should have this fixed shortly

joereynolds commented 6 years ago

Great stuff, I don't use postgres so I'm grateful for any help I get from actual users :D

misterbuckley commented 6 years ago

Should be fixed in #41

joereynolds commented 6 years ago

https://github.com/joereynolds/SQHell.vim/commit/82827da8d85c0c1ede2ff4f0e5819f8357a634df