> How do you make use of this? It seems like you would need your code to know > which foreign_oid referred to which table to actually perform the join. Sorry, wasn't very clear about what it does: select * from mytable t left join joinme j on t.id = j.foreign_id and t.tableoid = j.foreign_oid; I use it for 'PostIt note' type data that I want to be able to stick to any other row in the DB. Keeping the referential integrity is a bit of extra work, but I'm working on it :) If you're going the other way, yes, you'll need to find out what tables are joined to your postit first. But that's easy with: select foreign_oid::regclass from joinme where... But back to my original question: are those tableoid's going to suddenly wrap around? M ---------------------------(end of broadcast)--------------------------- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match