Обсуждение: CREATE OR REPLACE TRIGGER not supported?

Поиск
Список
Период
Сортировка

CREATE OR REPLACE TRIGGER not supported?

От
Satoshi Nagayasu
Дата:
Hello all,

A few days ago, I found that "CREATE OR REPLACE TRIGGER"
is not allowed on 7.4.2.  However, functions and rules allow
"CREATE OR REPLACE" statement.

Is threre any reason not to support "CREATE OR REPLACE"
only for triggers?

Thanks.
-- 
NAGAYASU Satoshi <nagayasus@nttdata.co.jp>
OpenSource Development Center,
NTT DATA Corp. http://www.nttdata.co.jp/



Re: CREATE OR REPLACE TRIGGER not supported?

От
John Hansen
Дата:
On Mon, 2004-09-13 at 10:52, Satoshi Nagayasu wrote:
> A few days ago, I found that "CREATE OR REPLACE TRIGGER"
> is not allowed on 7.4.2.  However, functions and rules allow
> "CREATE OR REPLACE" statement.
> Is threre any reason not to support "CREATE OR REPLACE"
> only for triggers?

And while we're at it,.... CREATE OR REPLACE type;

... John




Re: CREATE OR REPLACE TRIGGER not supported?

От
Christopher Kings-Lynne
Дата:
> A few days ago, I found that "CREATE OR REPLACE TRIGGER"
> is not allowed on 7.4.2.  However, functions and rules allow
> "CREATE OR REPLACE" statement.
> 
> Is threre any reason not to support "CREATE OR REPLACE"
> only for triggers?

Because the oid of a trigger doesn't matter.  You can go being; drop 
trigger; create trigger; commit; atomically.

Chris



Re: CREATE OR REPLACE TRIGGER not supported?

От
Tom Lane
Дата:
Christopher Kings-Lynne <chriskl@familyhealth.com.au> writes:
>> Is threre any reason not to support "CREATE OR REPLACE"
>> only for triggers?

> Because the oid of a trigger doesn't matter.  You can go being; drop 
> trigger; create trigger; commit; atomically.

And how often do you need to redefine a trigger (as opposed to its
underlying function), anyway?

Sure, given infinite manpower we would support this.  But it seems very
far down the to-do list to me.
        regards, tom lane


Re: CREATE OR REPLACE TRIGGER not supported?

От
Satoshi Nagayasu
Дата:
> And how often do you need to redefine a trigger (as opposed to its
> underlying function), anyway?

I just want to know why not supported.
It's not a serious problem.

Tom Lane wrote:
> Christopher Kings-Lynne <chriskl@familyhealth.com.au> writes:
> 
>>>Is threre any reason not to support "CREATE OR REPLACE"
>>>only for triggers?
> 
> 
>>Because the oid of a trigger doesn't matter.  You can go being; drop 
>>trigger; create trigger; commit; atomically.
> 
> 
> And how often do you need to redefine a trigger (as opposed to its
> underlying function), anyway?
> 
> Sure, given infinite manpower we would support this.  But it seems very
> far down the to-do list to me.
> 
>             regards, tom lane
> 


-- 
NAGAYASU Satoshi <nagayasus@nttdata.co.jp>
OpenSource Development Center,
NTT DATA Corp. http://www.nttdata.co.jp/