Showing revision 2


PostgreSQL: tableoid,oid,ctid

tableoid is the oid of a table, oid - id for identification (only if table was created WITH OIDS), ctid - tuple id in its table (block#,id in block). ctid reflects physical location of tuple and changes in update and vacuum (CLUSTER also changes ctid).

currtid(tableoid::oid,ctid::tid), currtid2(table_name::text,ctid::tid) return new ctid after last update.

ctid is good to access to 1 tuple only!!!, since no hashjoin, mergejoin operations are defined for tid datatype.

ctid is safe to use only withing one transaction !!!

ctid could be used to bypass index on an update.