
Example:
dbadmin=> SELECT * FROM test;
c1 | c2 | c3
---------+----+---------
Vertica | is | Awesome
(1 row)
dbadmin=> \pset fieldsep ','
Field separator is ",".
dbadmin=> SELECT * FROM test;
c1 | c2 | c3
---------+----+---------
Vertica | is | Awesome
(1 row)
Wait a second! I changed the field separator but vsql is still displaying the default | (vertical bar)!Turns out the fieldsep option is only valid when the output format is set to unaligned. How do I do that? With the format option!
dbadmin=> \pset format unaligned
Output format is unaligned.
dbadmin=> SELECT * FROM test;
c1,c2,c3
Vertica,is,Awesome
(1 row)
Helpful link:https://my.vertica.com/docs/latest/HTML/index.htm#Authoring/ConnectingToVertica/vsql/Meta-Commands/psetNAMEVALUE.htm
Have fun!