CREATE OR REPLACE TRIGGER not supported?

Started by Satoshi Nagayasuover 21 years ago5 messages
#1Satoshi Nagayasu
nagayasus@nttdata.co.jp

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/

#2John Hansen
john@geeknet.com.au
In reply to: Satoshi Nagayasu (#1)
Re: CREATE OR REPLACE TRIGGER not supported?

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

#3Christopher Kings-Lynne
chriskl@familyhealth.com.au
In reply to: Satoshi Nagayasu (#1)
Re: CREATE OR REPLACE TRIGGER not supported?

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

#4Tom Lane
tgl@sss.pgh.pa.us
In reply to: Christopher Kings-Lynne (#3)
Re: CREATE OR REPLACE TRIGGER not supported?

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

#5Satoshi Nagayasu
nagayasus@nttdata.co.jp
In reply to: Tom Lane (#4)
Re: CREATE OR REPLACE TRIGGER not supported?

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/