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

feature: support for piping into jq #44

Closed
bjne opened this issue Nov 28, 2017 · 3 comments
Closed

feature: support for piping into jq #44

bjne opened this issue Nov 28, 2017 · 3 comments
Labels

Comments

@bjne
Copy link

bjne commented Nov 28, 2017

jq (https://stedolan.github.io/jq/) is a great tool for pretty-printing json. Is it possible to add support
for piping a json column into jq from pspg?

generic piping support with the "|" char would be awesome

@okbob
Copy link
Owner

okbob commented Nov 28, 2017

I don't think so it is possible. pspg cannot do any operation that can break formatting of input. Any transformation should be done before psql does tabular output. I can imagine so this library can be wrapped and called directly from SQL.

@okbob okbob added the question label Nov 29, 2017
@bjne
Copy link
Author

bjne commented Nov 29, 2017

I am not sure I get you, what I am thinking is:

  • pspg opens as normal with no data manipulation
  • possible to select a column (like one does with the "hold column"/with arrow keys)
  • pressing | will allow me to pipe the content of this row/column into a external program
  • jq (in this example) should then be forked and given the column data on stdin

@okbob
Copy link
Owner

okbob commented Nov 29, 2017

I am afraid so I am not get it. Why you don't do it directly from psql?

@okbob okbob closed this as completed Dec 1, 2017
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

2 participants