From: | Jon Lapham <jlapham(at)gandalf(dot)bioqmed(dot)ufrj(dot)br> |
---|---|
To: | Michael Richards <michael(at)fastmail(dot)ca> |
Cc: | pgsql-sql(at)postgresql(dot)org |
Subject: | Re: on line numbers, drop table errors, and log files |
Date: | 2000-08-02 13:02:33 |
Message-ID: | 20000802100233.A16492@gandalf.bioqmed.ufrj.br |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
On Tue, Aug 01, 2000 at 02:32:27PM -0400, Michael Richards wrote:
> I would consider running:
> pg_dump -D -u -c -f backup.dump
> This will dump the schema and drop the objects before creating them.
> -Michael
>
> > 4) I run pg_dump this way: "pg_dump -D -u -a -f backup.dump
> > main_v0_6" in order to create a backup of my "main_v0_6" database.
> > In order to regenerate the database, I first run a "\i
> > create_tables.sql" script, then I run "\i backup.dump". However,
> > I end up having to hand edit the "backup.dump" file to place "drop
> > sequence" statements before the "create sequence" statements
> > because they are created by my "create_tables.sql" script. I'm
> > sure you Postgres gurus out there are not doing it this way, what
> > is your method of database backup/recovery?
Michael-
As I mentioned earlier, your solution worked great. I am a bit
puzzled about the syntax that is created by my old method, using "pg_dump
-D -u -a". I wonder why it creates "create sequence ..." commands instead
of "update sequence ..."?
The reason I was originally using "-a" to begin with was that I
wanted to seperate the data entry from the table creation step. So, the
idea was that I would have a nice hand editted script to make all my
tables, then the "-a" output of pg_dump would fill the database with data.
As I said, your solution works, thanks, I'm just puzzled why my
way didn't.
Later, Jon
--
-**-*-*---*-*---*-*---*-----*-*-----*---*-*---*-----*-----*-*-----*---
Jon Lapham
Centro Nacional de Ressonancia Magnetica Nuclear de Macromoleculas
Universidade Federal do Rio de Janeiro (UFRJ) - Brasil
email: jlapham(at)gandalf(dot)bioqmed(dot)ufrj(dot)br
***-*--*----*-------*------------*--------------------*---------------
From | Date | Subject | |
---|---|---|---|
Next Message | Itai Zukerman | 2000-08-02 13:41:52 | Time Aggregates |
Previous Message | Gerhard Dieringer | 2000-08-02 07:32:40 | Antw: SQL Question |