psql < scriptfile.txt
or in a psql console
\i scriptfile.txt
----- Original Message -----
From: Susan Hoddinott
To: pgsql-novice(at)postgresql(dot)org
Sent: Thursday, February 13, 2003 5:15 AM
Subject: [NOVICE] Executing SQL commands in script files
Following reading through all the documentation it is not clear to me how to run a script file containing a number of SQL commands. Presumably I do this through the psql interface but how do I tell it to run a script?