Oliver Vecernik <[EMAIL PROTECTED]> 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

---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster

Reply via email to