News for hackers. Stuff that matters.
Re:PostgreSQL 9.2 released by jeffdavis on Monday September 10, 2012 @01:07PM (#4500805)
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.

Re:PostgreSQL 9.2 released by joevandyk on Monday September 10, 2012 @01:23PM (#4500885)
Nice!

I tried using it for a result that contains really wide columns. I'm seeing a screen full of hyphens separating the rows.

You'd think that the hyphens would stretch across just one line of the screen, instead of across the whole result set. See https://img.skitch.com/20120910-fn1abpp3w94yhg63hc8yemt4a4.p...

Re:PostgreSQL 9.2 released by jeffdavis on Monday September 10, 2012 @01:59PM (#4501076)
Oh, interesting.

That's a problem for very wide fields, which aren't going to be handled very well even using \x.

\x was meant to handle large numbers of fields, or slightly wider fields.

But you're right, maybe that could be cleaned up a little more.

Re:PostgreSQL 9.2 released by daniellockard on Monday September 10, 2012 @11:10PM (#4503566)
Oh so like Mysql "\G" command.