Forum OpenACS Q&A: Response to How execute one script in postgres

Collapse
Posted by Patrick Giagnocavo on
If you are running the psql command line shell, you can use i to run the file.  On my systems, psql is compiled with readline support, so you can put in a part of the path and hit the TAB key to expand the path, similar to what you can do in the bash shell or with later versions of ksh.

As well, you can load the file by exiting psql and running psql -f /var/lib/aolserver/servers/openacs4/www/create_table.sql .

If however, you want to run only some of the SQL commands in the file but not others, I don't know how to do that from within psql itself.