Documentation — Commands reference

source

Runs the statements of a file. It is a command of the command line client: the server does not know it.

Syntax

source FILE;
  • If FILE does not exist and has no .sql extension, FILE.sql is tried.
  • The statements follow the usual rules: each ends with ;, and a statement may span several lines.
  • The file cannot contain another source command.
  • The statements of the file are not kept in the history.

This is how to create a table with hundreds of thousands of columns: put the alter table statements in files and run them one after the other.

source 01_create_table;
source 02_alter_batch_01;

← shutdown  |  truncate →