You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
but it can be more useful to have just one row for each item, using columns for the locations. In psql that involves just running the same query with \crosstabview:
Currently I switch from pgcli back to psql every time I want to do this.
(Yes, Postgresql itself has an extension which provides a crosstab() function for construction queries that will do this. But that's much more involved to use, or involves writing out all the column headers (the locations in the above example), or both. psql's command is quick and useful enough to use on ad-hoc queries.)
Your environment
Ubuntu Linux 22.04 LTS
pgcli Version: 3.4.1
The text was updated successfully, but these errors were encountered:
Description
It'd be nice to be able to view a query result as a 2D table, such as can be done in psql with its
\crosstabview
command.For instance suppose you have a stock level table with the stock for each item per location. You can list all the stock levels like this:
but it can be more useful to have just one row for each item, using columns for the locations. In psql that involves just running the same query with
\crosstabview
:Currently I switch from pgcli back to psql every time I want to do this.
(Yes, Postgresql itself has an extension which provides a
crosstab()
function for construction queries that will do this. But that's much more involved to use, or involves writing out all the column headers (the locations in the above example), or both. psql's command is quick and useful enough to use on ad-hoc queries.)Your environment
Ubuntu Linux 22.04 LTS
pgcli Version: 3.4.1
The text was updated successfully, but these errors were encountered: