Subject Re: [firebird-support] List of read only stored procedures.
Author liviuslivius
Hi,

For point 4 simply start readonly transaction
If it raise exception you got info about reason.
Also it is good to start transaction and rollback it if you doesn't need to modify something


Regards,
Karol Bieniaszewski



Wysłano z mojego smartfonu w PLAY

-------- Oryginalna wiadomość --------
Od: "will.honor@... [firebird-support]" <firebird-support@yahoogroups.com>
Data: 21.07.2017 16:50 (GMT+01:00)
Do: firebird-support@yahoogroups.com
Temat: [firebird-support] List of read only stored procedures.

 

Hello,

   Is it possible to select a list of read only stored procedures from the database.


  I'd like to give my reporting engine access to stored procedures where they fit the following rules


1.) Must be selectable

2.) Must have no input parameters.

3.) Must have one or more output parameters.

4.) Must not perform any database writes either directly or indirectly (via another procedure call.)


I have 1-3 sorted with the following SQL but I can't see if 4 is possible. Can anyone point me in the right direction please?


    select

      rdb$procedures.*

    from rdb$procedures

    where

      coalesce(rdb$procedures.rdb$procedure_inputs,0)=0

    and

      rdb$procedures.rdb$procedure_type = 1

    and

      rdb$procedures.rdb$procedure_outputs >0


Many thanks,

  Will.