Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: TRIGGER-Name of the current table
Taras wrote:
> Thanx for your answer, Martin,
>
> The main goal is to pass the original (old) record to a procedure,
> which would then concatinate all the values from this record an store
> them into a logging table. (i wanted to use that table name to retrieve
> rowtype later)
>
> I would like to have only one procedure, which would log records from
> many different tables.
> (perhaps i would pass them as ref cursor, i'm not sure yet how to do
> it, since i'm a beginner)
>
> The reason is that if we would decide to change the logging mechanism
> later, we would have to change only that procedure instead of 50
> triggers accross the schema.
>
> Also i would like to have this universal code, to add it to any new
> tables without serious modifications (because our database structure
> tends to change often)
>
> Regards, Taras
>
I will not argue with Robbert about using another method like Jornaling Table or the like - don't know what's out there, but IF there is something out-of-the-box out there I agree that you should probably use it :-)
But I was thinking for your specific case ... I doesn't make much
difference if you have to
a) CREATE TRIGGER ON TABLE X (...) MY_LOGGING_FUNC(:NEW)
or if you do
b) CREATE TRIGGER ON TABLE X (...) MY_LOGGING_FUNC('X', :NEW)
... or does it?
And of course we are back at the code-generating script with either (a)
or (b) in my opinion.
cheers,
Martin
Received on Thu Oct 05 2006 - 10:45:34 CDT
![]() |
![]() |