pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Dani Castaños <danitao.mailists@gmail.com>
To: pgsql-sql@postgresql.org
Subject: Database creation script
Date: Wed, 22 Aug 2007 13:33:10 +0200
Message-ID: <46CC1EF6.5030608@gmail.com> (raw)

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





Message-ID: <46CC1EF6.5030608@gmail.com>
Permalink:  ../46CC1EF6.5030608@gmail.com/
Also on:    postgresql.org/message-id/46CC1EF6.5030608@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: danitao.mailists@gmail.com
  Subject: Re: Database creation script
  In-Reply-To: <46CC1EF6.5030608@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox