Transitive Closure and 'pg_inherits'

From: Ioannis Theoharis
Subject: Transitive Closure and 'pg_inherits'
Date: ,
Msg-id: Pine.GSO.4.58.0504031734500.5404@ourania.ics.forth.gr
(view: Whole thread, Raw)
In response to: contrib/pg_buffercache  ("Andrew Dunstan")
Responses: Re: Transitive Closure and 'pg_inherits'  (Tom Lane)
List: pgsql-hackers

Tree view

contrib/pg_buffercache  ("Andrew Dunstan", )
 Re: contrib/pg_buffercache  (Mark Kirkwood, )
 Re: contrib/pg_buffercache  (Mark Kirkwood, )
  Re: contrib/pg_buffercache  (Andrew Dunstan, )
   Re: contrib/pg_buffercache  (Mark Kirkwood, )
    Re: contrib/pg_buffercache  (Andrew Dunstan, )
     Re: contrib/pg_buffercache  (Mark Kirkwood, )
 Transitive Closure and 'pg_inherits'  (Ioannis Theoharis, )
  Re: Transitive Closure and 'pg_inherits'  (Tom Lane, )
 Recursive SQL  (Ioannis Theoharis, )
  Re: Recursive SQL  (Euler Taveira de Oliveira, )



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:

From: Tom Lane
Date:
Subject: Re: Transitive Closure and 'pg_inherits'
From: "Jim C. Nasby"
Date:
Subject: Re: [GENERAL] plPHP in core?