Skip site navigation (1) Skip section navigation (2)

Re: Seperate files per function...

From: Michael Fuhr <mike(at)fuhr(dot)org>
To: Glenn Davy <gdavy(at)tpg(dot)com(dot)au>
Cc: Pgsql-Novice <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Seperate files per function...
Date: 2005-07-12 00:24:40
Message-ID: 20050712002440.GA79383@winnie.fuhr.org (view raw or flat)
Thread:
Lists: pgsql-novice
On Tue, Jul 12, 2005 at 09:43:30AM +1000, Glenn Davy wrote:
> I like to keep my views and functions etc in seperate files for source
> control purposes. What I'd like to do is have a 'master' script that
> includes each of the other files, in correct sequence. 
> i.e. psql < masterscript.sql 
> which would call each of fx_a.sql, fx_b.sql etc etc
> 
> The questing is whats the syntax in the master script to include
> fx_a.sql,fx_b.sql etc?

"\i filename" should work.  See "Meta-Commands" in the psql documentation:

http://www.postgresql.org/docs/8.0/static/app-psql.html

-- 
Michael Fuhr
http://www.fuhr.org/~mfuhr/

In response to

pgsql-novice by date

Next:From: Evans, RoyDate: 2005-07-12 15:06:28
Subject: ERROR: plperl functions cannot take type anyarray
Previous:From: Glenn DavyDate: 2005-07-11 23:43:30
Subject: Seperate files per function...

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group