Re: backup tableoids (pg_class.oid) ?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: "fkater(at)googlemail(dot)com" <fkater(at)googlemail(dot)com>, pgsql-general(at)postgresql(dot)org
Subject: Re: backup tableoids (pg_class.oid) ?
Date: 2008-02-04 19:47:30
Message-ID: 6986.1202154450@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Alvaro Herrera <alvherre(at)commandprompt(dot)com> writes:
> fkater(at)googlemail(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Gregory Stark 2008-02-04 19:48:16 Re: [GENERAL] PostgreSQL Certification
Previous Message Dave Page 2008-02-04 19:41:44 Re: postgresql book - practical or something newer?