| From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
|---|---|
| To: | Oliver Vecernik <vecernik(at)aon(dot)at> |
| Cc: | "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org> |
| Subject: | Re: general question on OIDs |
| Date: | 2001-05-06 04:36:02 |
| Message-ID: | 26978.989123762@sss.pgh.pa.us |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-admin |
Oliver Vecernik <vecernik(at)aon(dot)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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Oliver Vecernik | 2001-05-06 15:51:56 | Re: general question on OIDs |
| Previous Message | Oliver Vecernik | 2001-05-05 17:21:42 | general question on OIDs |