Re: Distributing PostGres database to various customers - Mailing list pgsql-general

From David Fetter
Subject Re: Distributing PostGres database to various customers
Date
Msg-id 20070612174514.GC13344@fetter.org
Whole thread Raw
In response to Re: Distributing PostGres database to various customers  ("Alexander Staubo" <alex@purefiction.net>)
List pgsql-general
On Mon, Jun 11, 2007 at 03:08:07PM +0200, Alexander Staubo wrote:
> On 6/11/07, Mike Gould <mgould@allcoast.net> wrote:
> >How can we do this with PostGres?  Other than backup and restore or
> >creating
> >SQL scripts I haven't been able to find another method.  Some of these
> >tables may have over a million rows in them initially if we convert old
> >data.
>
> The most portable way is probably pg_dump as plaintext:
>
>  pg_dump -Fp mydatabase >mydatabase.dump
>
> Then restore with:
>
>  cat mydatabase.dump | psql mydatabase

This is better phrased:

    psql -f mydadatabase.dump

If anything goes wrong, the error will contain the line number where
it went wrong.

Cheers,
D
--
David Fetter <david@fetter.org> http://fetter.org/
phone: +1 415 235 3778        AIM: dfetter666
                              Skype: davidfetter

Remember to vote!
Consider donating to PostgreSQL: http://www.postgresql.org/about/donate

pgsql-general by date:

Previous
From: Jiri Jakes
Date:
Subject: Re: PGSQL development tools. Any advice?
Next
From: Kenneth Downs
Date:
Subject: Re: PGSQL development tools. Any advice?