If the output of a query cannot be properly displayed within the dimensions of the terminal used to issue the query, the ASCII-art used to draw the table layout usually breaks and becomes a more of a hinderance than a help when trying to read the displayed results.
This also happens a lot when using Cassandra's cqlsh
. Although there is the option EXPAND ON
to display the results in a line based layout, I would rather like to configure cqlsh
in a way, so that table output that is too big for the terminal, is automatically piped into a pager.
In PostgreSQL's psql utitliy, the pager configured in the environment variable PAGER
is automatically used as soon as the output doesn't fit into the terminal. Usually the less
command is used as pager. In MySQL you can use a command like PAGER less
to display all results through a the pager less
.
Is there a comparable feature available in cqlsh
?
PAGING [ ON | OFF ] ( page_size )
– Flapper