Re: Making serial survive pg_dump

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Rod Taylor" <rbt(at)zort(dot)ca>
Cc: "Christopher Kings-Lynne" <chriskl(at)familyhealth(dot)com(dot)au>, "Hackers List" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Making serial survive pg_dump
Date: 2002-06-14 03:11:52
Message-ID: 2285.1024024312@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

"Rod Taylor" <rbt(at)zort(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2002-06-14 03:17:01 Re: PostGres Doubt
Previous Message Larry Rosenman 2002-06-14 02:55:13 Re: [HACKERS] First cut at SSL documentation