From c0a79616e724785b8c637fa50b31b5499aec5b38 Mon Sep 17 00:00:00 2001 From: jbranchaud Date: Sat, 20 Jun 2015 17:49:46 -0500 Subject: [PATCH] Add Auto Expanded Display as a postgres til. --- README.md | 1 + postgres/auto-expanded-display.md | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 postgres/auto-expanded-display.md diff --git a/README.md b/README.md index 0a24c39..b12c361 100644 --- a/README.md +++ b/README.md @@ -54,6 +54,7 @@ smart people at [Hashrocket](http://hashrocket.com/). ### postgres +- [Auto Expanded Display](postgres/auto-expanded-display.md) - [Configure The Timezone](postgres/configure-the-timezone.md) - [Count Records By Type](postgres/count-records-by-type.md) - [Extracting Nested JSON Data](postgres/extracting-nested-json-data.md) diff --git a/postgres/auto-expanded-display.md b/postgres/auto-expanded-display.md new file mode 100644 index 0000000..6ea148b --- /dev/null +++ b/postgres/auto-expanded-display.md @@ -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