Re: Making serial survive pg_dump - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Making serial survive pg_dump
Date
Msg-id 2285.1024024312@sss.pgh.pa.us
Whole thread Raw
In response to Re: Making serial survive pg_dump  ("Rod Taylor" <rbt@zort.ca>)
List pgsql-hackers
"Rod Taylor" <rbt@zort.ca> writes:
>> What happens is the sequence is shared between several tables (eg.
>> invoice numbers or something)

> You cannot accomplish this situation by strictly using the SERIAL
> type.

But Chris is correct that there are borderline cases where we might
do the wrong thing if we're not careful.  The real question here,
I suspect, is what rules pg_dump will use to decide that it ought
to suppress a CREATE SEQUENCE command, DEFAULT clause, etc, in
favor of emitting a SERIAL column datatype.  In particular, ought it
to depend on looking at the form of the name of the sequence?
I can see arguments both ways on that...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Larry Rosenman
Date:
Subject: Re: First cut at SSL documentation
Next
From: Tom Lane
Date:
Subject: Re: PostGres Doubt