Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Breaks toolbelt pg:psql features #71

Closed
msakrejda opened this issue Feb 28, 2014 · 5 comments
Closed

Breaks toolbelt pg:psql features #71

msakrejda opened this issue Feb 28, 2014 · 5 comments
Labels

Comments

@msakrejda
Copy link
Contributor

Because this plugin redefines the pg:psql command, features like -c and the app::COLOR prompt don't work if the plugin is installed:

maciek@gamera:~$ heroku pg:psql maroon --app db-corral
---> Connecting to HEROKU_POSTGRESQL_MAROON_URL
Pager usage is off.
psql (9.3.3, server 9.3.2)
SSL connection (cipher: DHE-RSA-AES256-SHA, bits: 256)
Type "help" for help.

db-corral::MAROON=> \q
maciek@gamera:~$ heroku pg:psql -c "select 1" maroon --app db-corral
---> Connecting to HEROKU_POSTGRESQL_MAROON_URL
 ?column? 
----------
        1
(1 row)
maciek@gamera:~$ heroku plugins:install https://github.com/heroku/heroku-pg-extras
Installing heroku-pg-extras... done
maciek@gamera:~$ heroku pg:psql maroon --app db-corral
Pager usage is off.
psql (9.3.3, server 9.3.2)
SSL connection (cipher: DHE-RSA-AES256-SHA, bits: 256)
Type "help" for help.

d7sae5lh1fgjii=>

maciek@gamera:~$ heroku pg:psql -c "select 1" maroon --app db-corral
Pager usage is off.
psql (9.3.3, server 9.3.2)
SSL connection (cipher: DHE-RSA-AES256-SHA, bits: 256)
Type "help" for help.

d7sae5lh1fgjii=> 
@jaredbeck
Copy link

Jon Mountjoy has described a work-around to this problem using echo.

@will
Copy link
Contributor

will commented May 5, 2014

~ ➤ heroku pg:psql -a will <<< 'select 1'
 ?column?
----------
        1
(1 row)

Time: 73.745 ms

that has worked forever, I'm not sure why Ed added the -c thing since it's
redundant. I think I remember arguing against it being added and lost but I
don't remember why

On Mon, May 5, 2014 at 3:07 PM, Jared Beck notifications@github.com wrote:

Jon Mountjoy http://stackoverflow.com/users/247451/jon-mountjoy has
described a work-aroundhttp://stackoverflow.com/questions/23063270/how-to-pass-cli-options-to-heroku-pgpsqlto this problem using
echo.


Reply to this email directly or view it on GitHubhttps://github.com//issues/71#issuecomment-42232468
.

@msakrejda
Copy link
Contributor Author

psql itself supports -c, and without the rather obscure here string syntax, feeding psql (and heroku pg:psql) from standard in is awkward. Regardless of that, shadowing breaks app::COLOR prompts and any future flags / checks the Heroku CLI may add.

@will
Copy link
Contributor

will commented Oct 18, 2014

This is fixed by #96

@will
Copy link
Contributor

will commented Oct 24, 2014

fixed

@will will closed this as completed Oct 24, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants