Re: OIDs depending data -- how to dump/restore? - Mailing list pgsql-general

From Raymond O'Donnell
Subject Re: OIDs depending data -- how to dump/restore?
Date
Msg-id 4B9D1193.5090509@iol.ie
Whole thread Raw
In response to OIDs depending data -- how to dump/restore?  ("fkater@googlemail.com" <fkater@googlemail.com>)
List pgsql-general
On 14/03/2010 16:21, fkater@googlemail.com wrote:

> (2)
> If I need to go the long way and replace the OIDs with
> SERIALs first, updating all relations to it etc: Would a
> dump/restore then restore the original values in a SERIAL
> column?

So-called SERIAL types are actually just integer columns which take
nextval('some_sequence') as their DEFAULT, so yes - if you first replace
your OIDs with serials, the values will still be there after a dump/restore.

This is probably the more robust way to go long-term.

Ray.

--
Raymond O'Donnell :: Galway :: Ireland
rod@iol.ie

pgsql-general by date:

Previous
From: "fkater@googlemail.com"
Date:
Subject: OIDs depending data -- how to dump/restore?
Next
From: Vick Khera
Date:
Subject: Re: hardware for a server