Unable to restore table oids from pg_dump

From: dharana <dharana(at)dharana(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Unable to restore table oids from pg_dump
Date: 2005-03-29 14:56:24
Message-ID: 42496C98.2050000@dharana.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello list,

I've got a problem. I have a table like this:

id | integer | not null
item_table_oid | oid |
item_row_id | oid |

"id" is a serial field for this table,

"item_table_oid" is an oid referencing the oid of the table in the
pg_catalog.pg_class table

"item_row_id" is an oid that references the oid of a data row in the
table refered by item_table_oid

When I pg_dumpall -o and then I try to restore it in a clean cluster
every table has new OIDs so the item_table_oid is invalid.

I did a "DELETE FROM pg_class" and I learnt that it's a quick way of
erasing a database.

Isn't there any way of dumping the pg_class entries so the references
would still work after restoring in a clean env?

Thanks in advance,

--
Juan Alonso
http://gamersmafia.com | http://laflecha.net

Browse pgsql-general by date

  From Date Subject
Next Message Peterson, Bjorn 2005-03-29 15:04:56 Zombie processes
Previous Message Tom Lane 2005-03-29 14:37:27 Re: pg_xlog disk full error, i need help