How to pass CLI options to heroku pg:psql? -
- given
heroku pg:psql
works, connects database - and
$sql
valid sql query - when run
heroku pg:psql -c $sql
- then expect see results of query
- and expect
heroku
exit status code of0
instead, -c
option ignored, $sql
not executed, , interactive prompt shown.
looks bug, sorry :-/
i've reported it.
it appears pg:extras
might culprit, , if didn't have that, may work. see here
try
heroku plugins:uninstall heroku-pg-extras
there's work around - pipe command in:
<<< "select count(*) features;" | heroku pg:psql -a appname -c -
Comments
Post a Comment