\pset
Sets options that control how Vertica formats query result output.
Syntax
\pset output-option
Output Options
Unless otherwise specified, output options are valid for all formats.
format format‑option
|
Sets output format, where format‑option is one of the following:
|
border int
|
Valid only if output format is set to |
expanded
|
Toggles between regular and expanded format. When expanded format is enabled, all output has two columns with the column name on the left and the data on the right. This mode is especially useful for wide tables. |
fieldsep 'arg'
|
Valid only if output format is set to For example, to specify tab as the field separator: \pset fieldsep '\t' |
footer
|
Toggles display of the default footer:
|
null 'string'
|
Specifies to represent column null values as string. By default, Vertica renders null values as an empty field, which might be mistaken as an empty string. For example: \pset null '(null)' |
pager [always]
|
Toggles use of a pager for query and vsql help output. If the environment variable When the pager is off, the pager is not used. When the pager is on, the pager is used only when appropriate; that is, the output is to a terminal and does not fit on the screen. (vsql does not do a perfect job of estimating when to use the pager.) If qualified with the argument always, the pager is always used. |
recordsep 'char'
|
Valid only if output format is set to |
tableattr html‑attribute[…]
|
Specifies attributes to be placed inside the HTML |
title ['title‑str']
|
Sets a title that precedes query result output, to title‑str. HTML output renders this as follows: <caption>title-str</caption> To remove the title, reissue the command omit the title‑str argument. |
trailingrecordsep
|
Toggles on or off the trailing record separator to use in unaligned output mode. |
t[uples_only]
|
Toggles between tuples only and full display. Full display might show extra information such as column headers, titles, and various footers. In tuples only mode, only actual table data is shown. |
Shortcuts
The following \pset commands have short-cuts:
PSET command | Shortcut |
---|---|
\pset expanded |
\x |
\pset fieldsep 'arg'
|
\f
|
\pset format aligned |
\a |
\pset format html |
\H |
\pset tableattr html‑attribute[…] |
\T html‑attribute[…] |
\pset title title-str |
\C ['title-str'] |
\pset tuples_only |
\t |