Search Postgresql Archives

Re: Finding recursive dependencies

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Joel Jacobson <joel@xxxxxxxxxxxxxxx> writes:
> 2011/1/2 Tom Lane <tgl@xxxxxxxxxxxxx>
>> The thing you're missing is that implicit dependencies are really
>> bidirectional:

> So, basically it's not possible to define a recursive query only making use
> of pg_depend to build an entire dependency tree of all oids?
> It appears to me it's necessary to join the object type specific tables,
> such as pg_rewrite, to build a complete tree?

No, that's nonsense.  The information is in pg_depend; it's just not
expressed in a way that makes it easy to scan it in a single recursive
query.  If you could do something like

	select base-case
	union all
	select objid ... where refobjid matches
	union all
	select refobjid ... where objid matches and deptype = 'i'

then it'd be easy, but you only get one UNION ALL per recursive query.

			regards, tom lane

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux