| От | Tom Lane |
|---|---|
| Тема | Re: general question on OIDs |
| Дата | |
| Msg-id | 26978.989123762@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | general question on OIDs (Oliver Vecernik <vecernik@aon.at>) |
| Список | pgsql-admin |
Oliver Vecernik <vecernik@aon.at> writes:
> Using of OIDs as foreign keys is recommended in the docs.
Er ... where? It shouldn't be.
> But what happens if I have to upgrade my server? For example for the new
> 7.1 release an initdb is required. OIDs start from 16384 or something.
> After importing my old databases can I expect that OIDs are not unique
> any more? Or is there any other handling to prevent this?
This is why it shouldn't be. Reloading a pg_dump-with-OIDs will
probably yield a conflict-free database, but it's not certain;
and it is certain that you'll waste lots of OIDs that way. Much
better to use serial columns for foreign keys.
regards, tom lane
В списке pgsql-admin по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера