Re: SQL scripts - sequences

From: "Adam Lang" <aalang(at)rutgersinsurance(dot)com>
To: "Brook Milligan" <brook(at)biology(dot)nmsu(dot)edu>
Cc: <pgsql-general(at)postgresql(dot)org>
Subject: Re: SQL scripts - sequences
Date: 2000-08-29 17:30:25
Message-ID: 012b01c011de$d18462e0$330a0a0a@Adam
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Oh wow (after reading over pg_dump and trying it). I didn't know about
that. That's very nice.

Is it safe and accurate? Should I be able to feel mostly secure about using
that to dump my database definitions?

Adam Lang
Systems Engineer
Rutgers Casualty Insurance Company
----- Original Message -----
From: "Brook Milligan" <brook(at)biology(dot)nmsu(dot)edu>
To: <aalang(at)rutgersinsurance(dot)com>
Cc: <pgsql-general(at)postgresql(dot)org>
Sent: Tuesday, August 29, 2000 12:28 PM
Subject: Re: [GENERAL] SQL scripts - sequences

> My solution in a similar situation is to have a bunch of scripts to
> drop/create the tables/functions/views/triggers/... needed. Use
> pg_dump to dump just the data (not the schema) but include the -c flag
> (I use -a -c -D) so that sequences are dropped and recreated with the
> right values. To reload: run pg_dump -a -c -D, run your scripts
> (which drop and recreate the data structures, then run your pg_dump
> output through psql to reload the data. Sequences and tables will
> agree fine.
>
> Cheers,
> Brook

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Stephan Szabo 2000-08-29 17:50:41 Re: foreign keys - script
Previous Message Adam Lang 2000-08-29 17:12:05 foreign keys - script