Re: [HACKERS] Fwd: Joins and links - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: [HACKERS] Fwd: Joins and links
Date
Msg-id 199907051908.PAA07909@candle.pha.pa.us
Whole thread Raw
In response to Re: [HACKERS] Fwd: Joins and links  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
> Leon <leon@udmnet.ru> writes:
> >  We should make a real reference in one table to another! That
> >  means there could be special data type called, say, "link",
> >  which is a physical record number in the foreign table.
> 
> There is no such thing as a physical record number for a tuple in
> Postgres.  The closest you could come is an OID, which isn't really any
> faster than any other joinable field --- you still need an index to
> support fast lookup by OID.

Actually, there is:
select ctid from pg_class;
ctid  ------(0,1) (0,2) ...

The number is the block number offset in the block.  It doesn't help
because UPDATED rows would get a new tid.  Tid's can be used for short
periods if you are sure the data in the table doesn't change, and there
is a TODO item to allow ctid reference in the WHERE clause.




--  Bruce Momjian                        |  http://www.op.net/~candle maillist@candle.pha.pa.us            |  (610)
853-3000+  If your life is a hard drive,     |  830 Blythe Avenue +  Christ can be your backup.        |  Drexel Hill,
Pennsylvania19026
 


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Re[2]: [HACKERS] Fwd: Joins and links
Next
From: Bruce Momjian
Date:
Subject: Re: Re[2]: [HACKERS] Fwd: Joins and links