On Sat, Jan 15, 2005 at 05:11:16PM +0100, Bo Lorentsen wrote:
> Alvaro Herrera wrote:
> >Most system catalogs use OIDs as primary keys. So they cannot just
> >disappear. But on user tables, there's not a lot of use for them IMHO.
> >
> Ok, I think it is about time it is stated more clearly in the documentation.
But where in the documentation did you see anything saying that they
were unique? I imagine you just inferred that from somewhere. I'm not
sure where the documentation should be changed since nowhere actually
recommends them in any way.
> >There's no internal row id on Postgres; having one would mean more
> >storage requirements. If you want one, you know where to get it ... if
> >not, you may as well save the space.
> >
> So, how does a index relate to a row ? There have to be some way of
> addressing a row ?
Using the CTID, which locates the physical tuple as (block,num). When
you update a tuple, or vacuum moves it its CTID will change, so it's
not terribly useful from a user's point of view.
Hope this helps,
--
Martijn van Oosterhout <kleptog@svana.org> http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.