Subject | Re: Adding trigger dynamically |
---|---|
Author | Adam |
Post date | 2008-11-16T23:28:55Z |
--- In firebird-support@yahoogroups.com, Harriv <harriv@...> wrote:
CREATE OR ALTER TRIGGER
trigger, or whether it requires a disconnect/reconnect before becoming
active. You certainly would need to commit the DDL.
script adds a new record to this table, and the executable checks
whether the version is recent enough at launch time. In our case it
just refuses to launch and gives an informative error message. For it
to occur however, the upgrader must have really broken something, so
we only ever see this in development or testing when a newer or older
production database is put alongside some binary we are testing with.
Adam
>Use the standard CREATE TRIGGER syntax, but instead change it to
> Hi,
>
> Is it possible to check if table has trigger defined and if trigger
> is missing add it? I'd like to my program to add it's own trigger when
> started if it doesn't exist.
CREATE OR ALTER TRIGGER
>I do not know whether exclusive use of the table is required to add a
> Also, are there any pitfalls when doing this kind of operation? I'm
> only used to modify database structure manually..
trigger, or whether it requires a disconnect/reconnect before becoming
active. You certainly would need to commit the DDL.
>Our approach is different, we have a productversion table. Every
> I'm using Python and kinterbasdb if it matters.
>
script adds a new record to this table, and the executable checks
whether the version is recent enough at launch time. In our case it
just refuses to launch and gives an informative error message. For it
to occur however, the upgrader must have really broken something, so
we only ever see this in development or testing when a newer or older
production database is put alongside some binary we are testing with.
Adam