pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Scott Marlowe <smarlowe@qwest.net>
To: Pradeepkumar, Pyatalo (IE10) <Pradeepkumar.Pyatalo@honeywell.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: help on automatically running sql files
Date: Tue, 31 Aug 2004 01:57:04 -0600
Message-ID: <1093939024.5493.62.camel@localhost.localdomain> (raw)
In-Reply-To: <77ED2BF75D59D1439F90412CC5B1097410F1EE62@ie10-sahara.hiso.honeywell.com>
References: <77ED2BF75D59D1439F90412CC5B1097410F1EE62@ie10-sahara.hiso.honeywell.com>

On Tue, 2004-08-31 at 01:33, Pradeepkumar, Pyatalo (IE10) wrote:
> Hi all,
> For the project that I am working on , we are using Postgresql 7.4.3 on
> Linux 7.2. We have all the database tables,triggers and stored procedures as
> seperate .sql files which we want to ship as part of our software. Now when
> the user installs our software, we need to check if postmaster service is
> running or not and if it is running, then we have to run the sql files
> automatically. Can anyone help me out on how to run the .sql files
> automatically.

Something like psql dbname <sqlfile.sql will do.  If psql isn't in the
path, then /path/to/psql dbname <sqlfile.sql




view thread (5+ messages)  latest in thread

Message-ID: <1093939024.5493.62.camel@localhost.localdomain>
Permalink:  ../1093939024.5493.62.camel@localhost.localdomain/
Also on:    postgresql.org/message-id/1093939024.5493.62.camel@localhost.localdomain

 · 

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: smarlowe@qwest.net, Pradeepkumar.Pyatalo@honeywell.com
  Subject: Re: help on automatically running sql files
  In-Reply-To: <1093939024.5493.62.camel@localhost.localdomain>
  References: <77ED2BF75D59D1439F90412CC5B1097410F1EE62@ie10-sahara.hiso.honeywell.com> <1093939024.5493.62.camel@localhost.localdomain>

* 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