Transitive Closure and 'pg_inherits'

From: Ioannis Theoharis <theohari(at)ics(dot)forth(dot)gr>
To: pgsql-hackers(at)postgresql(dot)org
Subject: Transitive Closure and 'pg_inherits'
Date: 2005-04-03 14:45:56
Message-ID: Pine.GSO.4.58.0504031734500.5404@ourania.ics.forth.gr
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-patches

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.

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ioannis Theoharis 2005-04-03 17:02:27 Recursive SQL
Previous Message Thomas Hallgren 2005-04-03 08:38:32 Re: [GENERAL] plPHP in core?

Browse pgsql-patches by date

  From Date Subject
Next Message Ioannis Theoharis 2005-04-03 17:02:27 Recursive SQL
Previous Message Greg Sabino Mullane 2005-04-03 13:12:28 Have psql \dD show checks