Display Null Query Result With an Alternate Text

In vsql the /pset meta-command is used to set options that control how Vertica formats query result output. One of my favorites is the null option which allows you to specify an alternative value for null in the result set of a query.

Example:

dbadmin=> \pset NULL 'Unknown';
\pset: unknown option: NULL

That didn’t work! Make sure to use a lower case null keyword!

dbadmin=> \pset null 'Unknown'
Null display is "Unknown".
dbadmin=> SELECT null "Is there life on Europa?";
Is there life on Europa?
--------------------------
Unknown