Ask a Cow to Display Query Results in YSQL

I used to have fun with the amusing old Linux command Cowsay which inserts any input into a word bubble and draws an ASCII cow to talk to you.

For a few laughs you can ask the cow to display your query results in YSQL!

Example:

				
					
yugabyte=# \! rpm -qa | grep cowsay
cowsay-3.03-14.el7.centos.noarch

yugabyte=# \! cowsay I love YUGABYTEDB!!
 _____________________
< I love YUGABYTEDB!! >
 ---------------------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||

yugabyte=# CREATE TABLE some_data (c VARCHAR(10));
CREATE TABLE

yugabyte=# INSERT INTO some_data SELECT 'A';
INSERT 0 1

yugabyte=# INSERT INTO some_data SELECT 'B';
INSERT 0 1

yugabyte=# INSERT INTO some_data SELECT 'C';
INSERT 0 1

yugabyte=# \! ysqlsh -Atc "SELECT c FROM some_data ORDER BY c;" | cowsay
 _______
< A B C >
 -------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||
				
			

Have Fun!