Re: on line numbers, drop table errors, and log files - Mailing list pgsql-sql

From Jon Lapham
Subject Re: on line numbers, drop table errors, and log files
Date
Msg-id 20000802100233.A16492@gandalf.bioqmed.ufrj.br
Whole thread Raw
In response to Re: on line numbers, drop table errors, and log files  ("Michael Richards" <michael@fastmail.ca>)
List 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 LaphamCentro Nacional de Ressonancia
MagneticaNuclear de MacromoleculasUniversidade Federal do Rio de Janeiro (UFRJ) - Brasilemail:
jlapham@gandalf.bioqmed.ufrj.br 
 
***-*--*----*-------*------------*--------------------*---------------


pgsql-sql by date:

Previous
From: "Gerhard Dieringer"
Date:
Subject: Antw: SQL Question
Next
From: Itai Zukerman
Date:
Subject: Time Aggregates