Commands.app

\i

psql Commands

Execute SQL from file in psql

Examples
Common usage examples

Run SQL file

\i script.sql

Run file relative to current script

\ir relative/path/script.sql
Notes
  • \ir is useful for including files within scripts
Related Commands
You might also find these useful