"Hillel" <hillel 'at' ecommunicate.biz> writes: > See doc on OID from > http://www.postgresql.org/docs/8.3/static/datatype-oid.html > > The oid type is currently implemented as an unsigned four-byte integer. > Therefore, it is not large enough to provide database-wide uniqueness in > large databases, or even in large individual tables. So, using a > user-created table's OID column as a primary key is discouraged. OIDs are > best used only for references to system tables.
I had seen this documentation. I really don't draw the same conclusion as you. I think that if it was dangerous for system tables, it would be mentioned, boldly, in the documentation, which is not the case. Documentation says that using OID is discouraged because uniqueness will not be guaranteed with large data sets. In the case of Kannel use, I think it makes sense to use them, though I can only agree that using a proper SERIAL type is better. [...] >> OIDs are a scarce resource, and if you run low on them it all goes > horribly >> wrong as OIDs are used for all sorts of stuff internal to the database, so >> if you use them all up on user tables it can cause problems. > > Do you have pointers to support that claim? I can find none on > pg's site. -- Guillaume Cottenceau, MNC Mobile News Channel SA, an Alcatel-Lucent Company Av. de la Gare 10, 1003 Lausanne, Switzerland - direct +41 21 317 50 36
