Re: backup tableoids (pg_class.oid) ? - Mailing list pgsql-general

From Tom Lane
Subject Re: backup tableoids (pg_class.oid) ?
Date
Msg-id 6986.1202154450@sss.pgh.pa.us
Whole thread Raw
In response to Re: backup tableoids (pg_class.oid) ?  (Alvaro Herrera <alvherre@commandprompt.com>)
List pgsql-general
Alvaro Herrera <alvherre@commandprompt.com> writes:
> fkater@googlemail.com wrote:
>> my db structure relays on the OIDs of tables (stored as OIDs of
>> pg_class).

> Probably it would be a better idea to store that as type regclass
> instead of OIDs.  I think that will take care of the dump part of the
> problem, at least.

+1

> It's likely that there will be an additional hurdle
> when trying to restore, because the referenced table would not have been
> created in the first place.

I think you'd probably be able to get away with it, because pg_dump
always creates all tables before loading any data.  If you were storing
index OIDs, maybe it wouldn't work.

            regards, tom lane

pgsql-general by date:

Previous
From: "Dave Page"
Date:
Subject: Re: postgresql book - practical or something newer?
Next
From: Gregory Stark
Date:
Subject: Re: [pgsql-advocacy] PostgreSQL Certification