Subject Re: [firebird-support] Re: In Firebird can you tell when a Stored procedure has been compiled
Author Ann Harrison
Having corrected some top-posting for clarity...


On Thu, 18 Dec 2014 18:28:56 -0500, "'Edward Mendez' Emendez001@...

[firebird-support]" <> wrote:
> Can you tell in Firebird 2.1.x or 2.5.x when a stored procedure has been
> compiled?


It is "compiled" (to BLR) at the moment you execute the CREATE, ALTER,


On Sat, Dec 20, 2014 at 10:31 AM, 'Edward Mendez' Emendez001@... [firebird-support] <> wrote:



Thank you, I kind of figured that.


Maybe I should have elaborated on my situation. I was given a FB Database and I need to verify if any of the stored procedures have been compiled/changed after a certain date. From what I can gather from the RDB$ tables, it looks like this is not feasible. But I needed to make sure.


Err, it's slightly more complicated than that.  When you create or alter a procedure, the PSQL is translated into BLR (Barry Louis Rubinson, also Binary Language Representation).  Aside from being inscrutable and binary, BLR is really no more compiled than PSQL.  A procedure is compiled on first reference after the database is opened (for SuperServer) or the connection established for Classic.  Compilation means that the data references are validated and translated into their internal names, conjuncts (relationships between tables) are evaluated and equalities distributed, indexed paths identified and their cost analyzed, and actions are translated into a tree of execution nodes.

None of that addresses your present problem, which is identifying procedures that have been changed recently.   This link may help: