Search Postgresql Archives

Re: MySQL to Postgres question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"James B. Byrne" <byrnejb@xxxxxxxxxxxxx> writes:
> On: Fri, 21 Mar 2008 13:53:36 -0500, "Adam Rich" <adam.r@xxxxxxxxxxxxx>
> wrote:
>> I'd like to point out that using pg_dump does in fact apply sequences
>> to columns after the fact. (at least in 8.3)  Columns lose their
>> "serial" designation after each backup/restore (and therefore during
>> version upgrades)

> Can someone expand upon this observation with respect to tables with surrogate
> primary keys generated by a sequence?

The short answer is that Adam's statement is wrong, or at least
misleading.  pg_dump does restore serial columns to the same state
they were in.  (This has little to do with whether the word "serial"
is used in the dump script, which is what he seems to be complaining
about.)

There are some corner cases involving altering either the name of the
serial column or the name of the associated sequence (but not both
to match) that a dump and reload wouldn't exactly reproduce in pre-8.2
versions.

			regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux