Subject Re: [firebird-support] Procedures that operate on a given table
Author Milan Babuskov
Eduardo Resek wrote:
> For component development purposes, I need to grab all procedures that
> perform each of the UID operations on a given table. From the
> RDB$DEPENDENCIES system table I can get the procedure names, but not what
> they do. I have tried to select from RDB$PROCEDURES filtering out those
> whose body (RDB$PROCEDURE_SOURCE contains 'DELETE FROM <TABLE_NAME>, etc.,
> but this is obviously misleading, as there can be commented code in
> procedure's text, or the words can be split across lines. Does anybody know
> about a precise method for that?

You could write a simple parser that does it (escape newlines, quotes,
comments, etc. and only extract statements). Although, if procedure uses
EXECUTE STATEMENT, than you're out of luck.

Beside parsing the source, you might also want to parse BLR, but that
requires knowlegde about Firebird internals.

--
Milan Babuskov
http://www.flamerobin.org


--
Milan Babuskov
http://njam.sourceforge.net
http://www.flamerobin.org