\g

The \g meta-command sends the query in the input buffer (see \p) to the server. With no arguments, it displays the results in the standard way.

\g FILE sends the query input buffer to the server, and writes the results to FILE.

\g | COMMAND sends the query buffer to the server, and pipes the results to a shell COMMAND.

See Also