Re: how could i know when table is created.
Posted by:
Rick James
Date: December 12, 2013 01:28PM
Can you preemptively create the table? That is, create the table and the trigger the night before the library will create it? This could work if (1) they do IF NOT EXIST, and (2) you know the schema.
Make a cron job that runs a C program that
0. figure out what today's table name is, based on time().
1. check whether the trigger has been created yet
2. check whether today's table exists
3. creates the trigger.
Step 1 probes information_schema to look for the TRIGGER. If it exists, terminate the cron job.
Step 2 involves a SELECT ... FROM information_schema.TABLES ... and exits if the table does not exist yet.
Run the cron job */5 * * * * to get it to check every 4 minutes. (Or whatever is suitable.
Caveat: There will be a period of time (up to 5 minutes) where the trigger is missing. I do not see how to avoid this gap.
You have discovered a generic problem with 3rd party packages -- they often do not do quite everything you need. And the kludges to workaround their limitations can be nasty. If it is "open source", then patch it! If not, explain to them why their software is not usable, and abandon it!
Subject
Written By
Posted
December 11, 2013 07:04PM
December 11, 2013 09:01PM
December 11, 2013 11:22PM
December 11, 2013 11:24PM
December 11, 2013 11:37PM
December 12, 2013 12:41AM
December 12, 2013 01:41AM
Re: how could i know when table is created.
December 12, 2013 01:28PM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.