Transitive Closure and 'pg_inherits' - Mailing list pgsql-hackers

From Ioannis Theoharis
Subject Transitive Closure and 'pg_inherits'
Date
Msg-id Pine.GSO.4.58.0504031734500.5404@ourania.ics.forth.gr
Whole thread Raw
In response to contrib/pg_buffercache  ("Andrew Dunstan" <andrew@dunslane.net>)
Responses Re: Transitive Closure and 'pg_inherits'  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers


Hi,

in case one use 'inherits' relationship to create a hierarchy of
tables, table 'pg_inherits' stores for each table the information of which
is its parent table.

During the evaluation of a query like
select * from Root;
where Root is the 'root' table of our hierarchy, postgreSQL needs to
find which tables are involved in the result (which tables belong to the
hierarchy).

My question is whether the way, in wich postgresql do this task, is a
transitive closure on table 'pg_inherits' or there is a better approach
implemented (like numbering scheme techniques etc.) ?

If there is a related url, please send it to me.



pgsql-hackers by date:

Previous
From: Thomas Hallgren
Date:
Subject: Re: [GENERAL] plPHP in core?
Next
From: Ioannis Theoharis
Date:
Subject: Recursive SQL