Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <h2>(New) Expanded Auto Mode: \x auto</h2> <p>New for Postgresql 9.2; PSQL automatically fits records to the width of the screen. previously you only had expanded mode on or off and had to switch between the modes as necessary. </p> <ul> <li>If the record can fit into the width of the screen; psql uses normal formatting.</li> <li>If the record can <strong>not</strong> fit into the width of the screen; psql uses expanded mode.</li> </ul> <p>To get this use: <strong>\x auto</strong></p> <p><a href="https://www.postgresql.org/docs/9.5/static/app-psql.html" rel="noreferrer">Postgresql 9.5 Documentation on PSQL command.</a></p> <hr> <p>Wide screen, normal formatting:</p> <pre><code> id | time | humanize_time | value ----+-------+---------------------------------+------- 1 | 09:30 | Early Morning - (9.30 am) | 570 2 | 11:30 | Late Morning - (11.30 am) | 690 3 | 13:30 | Early Afternoon - (1.30pm) | 810 4 | 15:30 | Late Afternoon - (3.30 pm) | 930 (4 rows) </code></pre> <hr> <p>Narrow screen, expanded formatting:</p> <pre><code>-[ RECORD 1 ]-+--------------------------- id | 1 time | 09:30 humanize_time | Early Morning - (9.30 am) value | 570 -[ RECORD 2 ]-+--------------------------- id | 2 time | 11:30 humanize_time | Late Morning - (11.30 am) value | 690 -[ RECORD 3 ]-+--------------------------- id | 3 time | 13:30 humanize_time | Early Afternoon - (1.30pm) value | 810 -[ RECORD 4 ]-+--------------------------- id | 4 time | 15:30 humanize_time | Late Afternoon - (3.30 pm) value | 930 </code></pre> <hr> <h3>How to start psql with \x auto</h3> <p>Configure <code>\x auto</code> command on startup by adding it to <code>.psqlrc</code> in your home folder and restarting psql. <a href="https://www.postgresql.org/docs/9.5/static/app-psql.html" rel="noreferrer">Look under 'Files' section in the psql doc for more info</a>.</p> <p><strong>~/.psqlrc</strong></p> <pre><code>\x auto </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload