1

I want to load and execute a sql file from another sql file, but do not the syntax. Is this possible? In detail, I have a file install_tables.sql which should load a file tables_definition.sql.

1 Answer 1

8

If you run your script using psql you can embedd the \i command in your main script:

 \i tables_defininition.sql
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.