It's a display feature in the "psql" client program.
Normal result:
column1 | column2 | column3
---------+---------+---------
1 | a | 9.9
2 | b | 19.9
(2 rows)
Using \x:
-[ RECORD 1 ]-
column1 | 1
column2 | a
column3 | 9.9
-[ RECORD 2 ]-
column1 | 2
column2 | b
column3 | 19.9
The first form is tabular and works well for a few columns; but doesn't work well when there are many columns, because the lines start to wrap. So you use \x for wide tables to make the result readable (but, obviously, fewer rows are shown at a time).
Using "\x auto" automatically chooses which format to use based on your terminal width.
Normal result:
Using \x: The first form is tabular and works well for a few columns; but doesn't work well when there are many columns, because the lines start to wrap. So you use \x for wide tables to make the result readable (but, obviously, fewer rows are shown at a time).Using "\x auto" automatically chooses which format to use based on your terminal width.