pg_dump: preserving oids in system tables?

Поиск
Список
Период
Сортировка
От Natalie Wenz
Тема pg_dump: preserving oids in system tables?
Дата
Msg-id CAON+zeMbtqe2jccRFjrAoroLA8akn=ODMj_FZ1yR+OXYO8KM2w@mail.gmail.com
обсуждение исходный текст
Ответы Re: pg_dump: preserving oids in system tables?  ("David G. Johnston" <david.g.johnston@gmail.com>)
Список pgsql-admin
Can someone confirm something for me? It seems that pg_dump with the -o option preserves OIDS for user objects, but does not preserve the OIDs for objects in system tables. Is that correct? 

Is there any other way to preserve the OIDs in a system table? It would make sense if that is not possible, but if it *is* possible, I would love to know about it; it would make administering one of our databases easier.

(We have an in-house application that was developed in 2008 maybe? The app has a table that associates a user (role) with a "department" by inserting a row into a table with the values 'usesysid' from pg_user and a department. It *works*, until you have to dump and restore. Then that table ends up with garbage because the usesysids for each role is different in the new database. At least that's what I have seen.)

I have requested that the developer make a change in the application for future versions to use role names instead of the role's usesysid. In the meantime, database major version updates require some manual intervention, which is fine. I just wanted to ask in case there is a way to preserve those oids that I'm just not seeing.

Thanks!

Natalie

В списке pgsql-admin по дате отправления:

Предыдущее
От: Payal Singh
Дата:
Сообщение: Re: Import csv file error with double newline
Следующее
От: "David G. Johnston"
Дата:
Сообщение: Re: pg_dump: preserving oids in system tables?