Re: Pushing the limit of triggers
Posted in 1998
Certainly,
I think the Informix Stored Procedures & Triggers class contains an example
of this. You'd call a stored procedure from your trigger. You could then
build your unload row as a concantenated string and execute something like:
system 'append_my_string.ksh "' || MY_STRING || '""
The Korn script would accept the value of MY_STRING as an argument and
handle appending it to a file. It could also return success/failure to the
procedure. The only nice point about your other option of inserting into
another table would be that if you had logging on and were executing the
insert into the initial (triggered) table w/in a transaction, the 'unloadrow' would get rolled-back if the original row did.
Regards,
Bob Colombo
Bob Maccione <bmaccion@harrahs.com> wrote in article
<6ite84$6co$1@netserver.harrahs.com>...
> Hi all,
>
> We're running 7.14 (we know we should upgrade but that's another story)
> and I'm attempting to do the following:
>
> put a trigger on a table such that when an insert is performed the
following
> happens:
> 1: we create an unload record for the new data
> 2: we either store the unload record to a database or even better a
file
> (appending of course).
>
> periodically we either go and switch to another file or different table.
>
> It would really be nice if Informix allowed for app hooks to do this but
I
> can't find anything. Does anyone else have an idea?
>
> thx
> bob maccione
> bmaccione@harrahs.com
>
>
>