Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Display vertica records vertically in vsql

I am look for a command in vsql which is equivalent of \g in mysql console, because I need display the result set vertically, looking like this:

enter image description here

like image 743
Jade Tang Avatar asked Aug 25 '15 11:08

Jade Tang


1 Answers

You need to use the \x option.

For more formatting options use the \help command .

dbadmin=> select 1,2;
 ?column? | ?column?
----------+----------
        1 |        2
(1 row)

dbadmin=> \x
Expanded display is on.
dbadmin=> select 1,2;
-[ RECORD 1 ]
?column? | 1
?column? | 2

dbadmin=> select 1,2;
 ?column? | ?column?
----------+----------
        1 |        2
(1 row)

dbadmin=> \x
Expanded display is on.
dbadmin=> select 1,2;
-[ RECORD 1 ]
?column? | 1
?column? | 2
like image 54
Up_One Avatar answered Nov 15 '22 07:11

Up_One