mirror of
https://github.com/jbranchaud/til
synced 2026-01-03 07:08:01 +00:00
Add Auto Expanded Display as a postgres til.
This commit is contained in:
17
postgres/auto-expanded-display.md
Normal file
17
postgres/auto-expanded-display.md
Normal file
@@ -0,0 +1,17 @@
|
||||
# Auto Expanded Display
|
||||
|
||||
By default, postgres has expanded display turned off. This means that
|
||||
results of a query are displayed *horizontally*.
|
||||
At times, the results of a query can be so wide that line wrapping occurs.
|
||||
This can make the results and their corresponding column names rather
|
||||
difficult to read. In these situations, it is preferable to turn on expanded
|
||||
display so that results are displayed *vertically*.
|
||||
The `\x` command can be used to toggle expanded display on and off.
|
||||
|
||||
Having to toggle expanded display on and off depending on the way a
|
||||
particular set of results is going to display can be a bit tedious.
|
||||
Fortunately, running `\x auto` will turn on auto expanded display. This
|
||||
means postgres will display the results normally when they fit and only
|
||||
switch to expanded display when it is necessary.
|
||||
|
||||
h/t Jack Christensen
|
||||
Reference in New Issue
Block a user