Re: question: how to preload data and excute table creation scripts

From: Bruno Wolff III <bruno(at)wolff(dot)to>
To: Mark <sendmailtomark(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: question: how to preload data and excute table creation scripts
Date: 2004-12-11 19:32:40
Message-ID: 20041211193240.GB2668@wolff.to
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Wed, Dec 08, 2004 at 08:58:49 -0800,
Mark <sendmailtomark(at)yahoo(dot)com> wrote:
> Hi,
>
> I guess is simple, but cannot find out how to run scripts in psql(
> Linux)
>
> What I would like to do is following:
>
> 1. Create a table structure from scripts ?
> 2. Preload data to remote Linux box (IP added to conf file)

You can use psql to do things like this.
psql < ddl.sql
psql < copy.sql

(Where dd.sql holds the ddl creation commands and copy.sql holds the
copy commands to load the data. You can look at pg_dump output for
examples.)

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Bruno Wolff III 2004-12-11 19:39:30 Re: vacuumdb
Previous Message Bruno Wolff III 2004-12-11 19:29:13 Re: Select after insert to the unique column