rasqlinsert and SQL TRIGGERS
David Edelman
dedelman at iname.com
Fri Jun 28 18:44:58 EDT 2013
Matt,
A trigger is defined on a table so by definition, a table has to exist
before the trigger can be created. A trigger exists only for the lifetime of
its associated table. If you drop the table, you drop the trigger. If you
rename a table that has an associated trigger, the trigger is updated to
reflect the new table name.
Can you give a more concrete example of something that you would like to do
with a trigger? There may be another way to achieve the same goal.
--Dave
-----Original Message-----
From: argus-info-bounces+dedelman=iname.com at lists.andrew.cmu.edu
[mailto:argus-info-bounces+dedelman=iname.com at lists.andrew.cmu.edu] On
Behalf Of Matt Brown
Sent: Thursday, June 27, 2013 5:56 PM
To: Carter Bullard
Cc: argus-info at lists.andrew.cmu.edu
Subject: Re: [ARGUS] rasqlinsert and SQL TRIGGERS
Thanks for the fast reply.
File or argument based would be great!
Do you have experience using TRIGGERs on your target tables?
Thanks,
Matt
On Jun 27, 2013, at 5:39 PM, Carter Bullard <carter at qosient.com> wrote:
> I've been working on rasqlinsert() to fix some problems, and have some
fixes ready after this weekend.
> If there are some post table creation mysql statements you want to make,
for each table,
> we can just attach a file that has the statements in them, and I'll run
them with each new table.
> Or something like that could work?
>
> Carter
>
>
> On Jun 27, 2013, at 5:30 PM, Matt Brown <matthewbrown at gmail.com> wrote:
>
>> Hello,
>>
>> I'm interested in attaching TRIGGERs to the table(s) created by
rasqlinsert.
>>
>> I've spent some time hunting down various solutions to the problem of
>> creating TRIGGERs upon table creation, including reading that you
>> can't attach TRIGGERs to tables in the information_schema schema.
>>
>> Carter/Dave/etc: Do you all have any idea on how something like this
>> can be handled? I began researching something along the lines of
>> `CREATE TABLE n LIKE x`, but it doesn't appear that `LIKE` carries
>> TRIGGERs from the template table.
>>
>>
>> Any assistance is appreciated.
>>
>>
>> Thanks,
>>
>> Matt
>
More information about the argus
mailing list