\i

Reads and executes input from the specified file.

To see the lines on the screen as they are read, set the variable ECHO to all.

Syntax

\i filename

Examples

The Vertica vsql client on Linux supports backquote (backtick) expansion. For example:

  1. Set an environment variable to a path that contains scripts you want to run:
    $ export MYSCRIPTS=/home/dbadmin/testscripts
  2. Issue the vsql command.
    $ vsql
  3. Use backquote expansion to include the path for running an existing script—for example, sample.sql.
    => \i `echo $MYSCRIPTS/sample.sql`