UNICODE Linestyle for Query Results in YSQLSH

By default the YSQLSH CLI draws the lines that separate the columns and rows of a result set using ascii characters.

Example:

				
					yugabyte=# SELECT * FROM t ORDER BY 1;
 c1 | c2 |     c3
----+----+------------
  1 | A  | 2023-03-02
  2 | B  | 2023-03-03
  3 | C  | 2023-03-04
(3 rows)
				
			

To pretty up the results a little, you can chose to use UNICODE lines instead! 

Example:

				
					yugabyte=# \pset linestyle unicode
Line style is unicode.

yugabyte=# SELECT * FROM t ORDER BY 1;
 c1 │ c2 │     c3
────┼────┼────────────
  1 │ A  │ 2023-03-02
  2 │ B  │ 2023-03-03
  3 │ C  │ 2023-03-04
(3 rows)
				
			

Wait a second… The outout of the query looks almost the same! What gives?

When I cut and pasted the results from my YSQLSH CLI terminal into WordPress, it converted the characters back to ascii. 

Here is a screen shot of what you’d see in YSQLSH:

Have Fun!

I gave this little guy that nut!