Menu

#223 dependencys for views

v1.0
open
nobody
None
5
2016-03-31
2012-12-07
Anonymous
No

on propertys of views i get no "Objects that depend on" but there exists. i can lookup fro this objects on systemtable rdb$dependencies

Discussion

  • Reinier Olislagers

    Confirmed on 0.9.3 x64 Windows (git hash 1186200, the latest snapshot).

    Probably cause for/related to this problem: exporting database DDL gives the wrong order for views that depend on other views; e.g. the view part of the attached DDL script leads to an error:
    Table unknown
    TESTSUITESFLAT
    At line 28, column 27
    when trying to CREATE VIEW FLAT that depends on TESTSUITESFLAT

     

    Last edit: Reinier Olislagers 2012-12-08
  • Reinier Olislagers

    Problem still present on current snapshot.

    Possible hint for solution (humbly given, I'm not a C/C++ guy at all): in a FreePascal/Lazarus Firebird management tool, TurboBird, we've implemented a topological sort of the dependencies within the views category, as well as the stored procedure category.

    The relevant commit for stored procs:
    https://github.com/motaz/turbobird/commit/e4c666421c3ed8e80a5bf9aa23b546d18512e25a#commitcomment-6192876
    - topological sort could be provided by a C/C++ implementation a la http://rosettacode.org/wiki/Topological_sort#C
    - The procedure TdmSysTables.SortDependencies that takes a list of objects (stored proc names, view names etc, and sorts them using the rdb$dependencies table and the topological sort algorithm above) could be adapted to FlameRobin

     
  • Popa Adrian Marius

    • Group: v0.9.4 --> v1.0