Thread: Database creation script

Database creation script

From
Dani Castaños
Date:
Hi all!

I'm building a database creation script, and i want to modularize it.
Now, I'm trying something like:

/* - Customer creation script - Version : 1.0.0
*/

\set ON_ERROR_STOP 1
\set AUTOCOMMIT off

BEGIN;

\i languages_and_countries.sql
\i app_1.sql
\i app_2.sql[...]

END;

What do you think about this way of doing?
Which is the best option to do it?

Thanks in advance!

Dani Castaños