Subject | Re: [Firebird-Architect] Execute procedure using Role ? |
---|---|
Author | Vlad Khorsun |
Post date | 2009-05-25T13:25:30Z |
>> Your problem can be solved much easier.Probably GTT ON COMMIT DELETE ROWS would be helpful there
>
>> create table specFlags(x int);
>> grant all on specFlags to <list of your procedures>;
>> grant select on specFlags to public;
>
>> In procedure:
>
>> insert into specFlags values(current_transaction);
>> <do-what-you-need>;
>> delete from specFlags where x = current_transaction;
>
>> In trigger:
>> if (exists (select * from specFlags where x =
>> current_transaction)) then ....
>
> I had looked at something like this before, but it gets messy
> for some of the same reasons you describe above. It is a large
> modular system in which procedures call procedures so we end
> up needing the table of flags to deal with things in a stack
> or reference counter arrangement. When you consider the flag
> table maintenance has to go around BEGIN ... WHEN ANY ... END
> blocks - it gets quite horrible to maintain and starts to make
> even the most simple procedures quite ugly.
Regards,
Vlad