Re: :new & :old as records ?

From: Alexandr I. Alesinsky <al_at_investor.kharkov.ua>
Date: 1995/08/20
Message-ID: <AHa9qDmy1B_at_investor.kharkov.ua>#1/1


Keith B. McKendry wrote at 3 Aug 1995 16:03:47 -0500

>"Alexandr I. Alesinsky" <al_at_investor.kharkov.ua> wrote:
>
>>When I wrote a row-level triggers in Oracle I frequently need to pass a whole
>>set of record fields values to a procedure. But I can't. :new and :old is only
>>referencing, they aren't treated as real records by Oracle. If I wrote
>>somewhere in the trigger
 

>>my_procedure(:new)
>
>This gives me opportunity to post an idea that I have been batting
>around lately.
>
>Allow wildcard (*) with :new and :old designation.
>
>Possible usages:
>
>1) my_procedure(:new.*) or my_procedure(:new.*, :old.*)
> Allows passing of entire data record as it existed before and/or
> after update or delete.
>
>2) insert into my_table_history values (:old.*,sysdate,user)
> Allows writing entire record to audit table and avoids the
> mutating table error for triggers that are 'for each row' and
> trying to select record from table.
>
>3) where :new.* != :old.*
> if :new.* = :old.*
> would have to consider null to equal null and would be a way to
> see if any data really did change (in other words, user did not
> change '1' to '1') before processing rest of trigger. Do not
> want to track in audit trail.
>
>
>
>So what do you think?
>

I think, that wildcards is superflous, simly handling :new and :old as real records and allowing whole records insert/update would be enough.

Alexander Alesinsky,

JSV Investor
Kharkov, Ukraine Received on Sun Aug 20 1995 - 00:00:00 CEST

Original text of this message