pg_dump, serial - Mailing list pgsql-general

From Laurent ROCHE
Subject pg_dump, serial
Date
Msg-id 917533.32150.qm@web34415.mail.mud.yahoo.com
Whole thread Raw
Responses Re: pg_dump, serial  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Hi,

I understand (and I have read) that there have been changes and discussions about the way, pg_dump treats SERIAL
columnsin the latest versions(8.x). 
However, I have not been able to get a document explaining exactly what the changes are and what's the reasoning behind
it,not even in the documentation. 
Is there such a thing ?

At the moment, I am kind of stuck because of this.

Here is my situation :
I have a 8.1 PG server (on Ubuntu) with my development databases. I have created command scripts generating databases
creationscripts using pg_dump, to be able to store the db creation scripts in my source control (subversion). 
I have used pg_dump 8.1.4 as it generates a script with SERIAL columns, when pg _dump 8.2.0 generates a script with
SEQUENCEsfor columns created as SERIAL. 
I need this to be able to maintain easily an identical Derby database.

It worked well till I created a new PG server on my laptop (to be able to work while I was away). I decided to install
a8.2 server (to test the new version, for the day, Ubuntu will package 8.2). And that started my problem: even pg_dump
8.1.4will create a script WITH SEQUENCEs (on the 8.2 server).  And if I run this script (with SEQUENCEs) on the 8.1
serverto create a new db, extracting the script with pg_dump will still generate SEQUENCEs ! 
(and to add to the confusion PG Admin will still show SERIAL in the colums definition).

So my question is: can I create a script with SERIAL to be able to compare my new database (from 8.2) with my old (8.1)
dbscript in subversion. 

Thanks for taking the time to read all this.
I hope that somebody can at least give me some pointers about pg_dump and SERIAL.


Cheers,
L@u
The Computing Froggy








___________________________________________________________________________
Découvrez une nouvelle façon d'obtenir des réponses à toutes vos questions !
Profitez des connaissances, des opinions et des expériences des internautes sur Yahoo! Questions/Réponses
http://fr.answers.yahoo.com

pgsql-general by date:

Previous
From: Bill Moran
Date:
Subject: Re: How often do I need to reindex tables?
Next
From: Rob Schall
Date:
Subject: Re: Differences in identical queries