Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix dependency handling for functions
there are complex logic to handle object dependencies in GetDependencies function. This logic starts from non-internal dependencies (e.g. with namespaces) and enrich them by up to two levels of internal dependencies. E.g. some function depends on composite type and this type depends on a user table. But sometimes it's not enough, e.g. in case of function argument is an array of user composite types. In this case dependency chain is function-array_of_type-type-relation: classid | objid | refclassid | refobjid | deptype ----------+----------------+--------------+--------------+--------- pg_type | some_table | pg_class | some_table | i pg_type | some_table[] | pg_type | some_table | i pg_class | some_table | pg_namespace | public | n pg_proc | dependant_func | pg_namespace | public | n pg_proc | dependant_func | pg_type | some_table[] | n This patch append handling for one more dependency level. I've intentionally avoided recursive queries here because there are problems with recursive query support in the old gpdb versions. This code part has branches even for gpdb 4. Also, I couldn't reproduce longer chain of internal dependencies.
- Loading branch information