Change the VSQL Result Set Border: Quick Tip

Posted October 11, 2018 by Phil Molea, Sr. Information Developer, Vertica

Three 3D arrows, different colors pointing in different directions
Jim Knicely authored this tip.

vsql is a character-based, interactive, front-end utility that lets you type SQL statements and see the results. The results from vsql are formatted nicely with a border between columns. You are probably used to viewing border style 1, the default, but you may prefer border styles 0 or 2!

Example: dbadmin=> \pset border Border style is 1. dbadmin=> SELECT * FROM test_table; name | age | hair_color ---------+-----+------------- Captain | 2 | Brown Jane | 39 | Black Josh | 17 | N/A Lucy | 5 | White/Brown (4 rows) dbadmin=> \pset border 0 Border style is 0. dbadmin=> SELECT * FROM test_table; name age hair_color ------- --- ----------- Captain 2 Brown Jane 39 Black Josh 17 N/A Lucy 5 White/Brown (4 rows) dbadmin=> \pset border 2 Border style is 2. dbadmin=> SELECT * FROM test_table; +---------+-----+-------------+ | name | age | hair_color | +---------+-----+-------------+ | Captain | 2 | Brown | | Jane | 39 | Black | | Josh | 17 | N/A | | Lucy | 5 | White/Brown | +---------+-----+-------------+ (4 rows) Helpful link:

https://www.vertica.com/docs/latest/HTML/index.htm#Authoring/ConnectingToVertica/vsql/Meta-Commands/psetNAMEVALUE.htm

Have fun!