Each table has a column CTID which holds the row id of a row.
SELECT ctid FROM mytable;
SELECT datname,usename,procpid,client_addr,waiting,query_start,current_query FROM pg_stat_activity;
The exception join can be created with the combination of the left outer join and the query on null.
Table a:
Table b:
Select every entry from table a which has no entry in table b.
SELECT * FROM a LEFT OUTER JOIN b ON (a.id = b.fid) WHERE b.pid IS NULL
set enable_seqscan=true; set enable_indexscan=true;
\d
\d table_name
\l