Hello Adriano, >> I have a package with two routines in it, one of these routines is >> called by a trigger. >> In RDB$DEPEDENCIES, I can see that a package that uses a table, has a >> record >> with RDB$DEPENDENT_TYPE of 19 (“package body”) on a Table (“type 0”). >> The dependency for the trigger, with the EXECUTE PROCEDURE statement >> is listed >> as: >> <trigger> has a dependency on <routine> in <package>, type “procedure” >> (5). >> Now, there’s IMO two things wrong with dependencies: >> 1) there’s no specific type for “stored function” (dependencies are >> both registered >> with type 5, “stored procedure”) > >How do you see that? It's not what I see. Type 15 is used for functions.
Hmm, good question, mistake on my part, so it seems. 15 is used for stored functions AND external functions. >> 2) is the trigger depending on the –package- or on a –procedure- that >> happens to >> be inside a package? > >What would be the practical difference in Firebird? I see it's the same >as fields. Well, given the names are switched around, it's currently not "the same as fields". >> Mind you, when something depends on a field, the registered dependency >> type is >> 0 (table), and there’s an entry in rdb$field_name. >> To be consistent, the DEPENDED_ON_NAME would be the package name, and >> an additional column for “package routine” should be available, not >> the other >> way around, like it is now. > >A "package routine" column would be insufficient, as procedures and >functions can have identical names. Oh, this is something unexpected for me, didn't notice that. >>It would need two columns, one for procedure and another for function. >>Seems awful. Adding a "child object type" column? >> The current solution seems inconsistent to me. >> >Yes, but let see what others think. This is, to get dependencies on an object, I can check rdb$dependencies against rdb$dependent_name for all sorts of objects: procedures, tables, etc. But for packages, I suddenly need to use another column to get the dependencies and the NAME column lists child objects. With regards, Martijn Tonies Upscene Productions http://www.upscene.com Download Database Workbench for Oracle, MS SQL Server, Sybase SQL Anywhere, MySQL, InterBase, NexusDB and Firebird! ------------------------------------------------------------------------------ Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel