Thread: CREATE OR REPLACE TRIGGER not supported?

CREATE OR REPLACE TRIGGER not supported?

From
Satoshi Nagayasu
Date:
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?

From
John Hansen
Date:
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?

From
Christopher Kings-Lynne
Date:
> 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?

From
Tom Lane
Date:
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?

From
Satoshi Nagayasu
Date:
> 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/