Subject | Re: [ib-support] Privilege check? |
---|---|
Author | Helen Borrie |
Post date | 2001-04-12T11:18:57Z |
At 01:27 PM 12-04-01 +0400, you wrote:
A SP that is *not* a trigger has no special privileges with respect to any object.
A trigger has rights with respect to the table that owns it. If another table references it through a FOREIGN constraint; or if the trigger acts upon another table, then it gets no special privileges to those other tables.
I don't know what you mean by "in SQL realizations that interpret code of SP and triggers or not". Do you mean, does IB behave like MSSQL Server 7 (which does not compile SPs and triggers at all, but interprets them at run-time)? I don't understand the question you want answered...but IB does not produce interpreted code, it compiles SPs and triggers at CREATE time and runs the compiled code at run-time.
Prepare is a process that has to happen for every new SQL statement. During this process, the server checks the entire chain of privileges entailed for the ROLE (if implemented), the USER and the objects.
Perhaps you could explain what you want to do.
Regards,
Helen
All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________
>Helen Borrie wrote:I think my comment answered that.
>
> > At 12:04 PM 12-04-01 +0400, you wrote:
> >
> > > Just curiosity: is it linked with fact that IB stores SP as compiled or it
> > >is more deep reason and SQL realizations that interpret SP during execution
> > >have the same behavior?
> >
> > If you question means "Are privileges as known at compile time embedded in concrete by the compiler?" the answer is NO. The trigger has rights to operate on the table to which it belongs; except for that, it has to check both its own and the user's privileges at Prepare time.
> >
>
> Hi, Helen. I mean: Are set of actions named "Prepare" the same about privileges in SQL realizations that interpret code of SP and triggers or not. Thank you.
A SP that is *not* a trigger has no special privileges with respect to any object.
A trigger has rights with respect to the table that owns it. If another table references it through a FOREIGN constraint; or if the trigger acts upon another table, then it gets no special privileges to those other tables.
I don't know what you mean by "in SQL realizations that interpret code of SP and triggers or not". Do you mean, does IB behave like MSSQL Server 7 (which does not compile SPs and triggers at all, but interprets them at run-time)? I don't understand the question you want answered...but IB does not produce interpreted code, it compiles SPs and triggers at CREATE time and runs the compiled code at run-time.
Prepare is a process that has to happen for every new SQL statement. During this process, the server checks the entire chain of privileges entailed for the ROLE (if implemented), the USER and the objects.
Perhaps you could explain what you want to do.
Regards,
Helen
All for Open and Open for All
InterBase Developer Initiative ยท http://www.interbase2000.org
_______________________________________________________