Re: RULE vs TRIGGER

Поиск
Список
Период
Сортировка
Искать
От
will trillich
Тема
Re: RULE vs TRIGGER
Дата
Msg-id
20010731183115.D27771@serensoft.com
Ответ на
Re: RULE vs TRIGGER (Stephan Szabo)
Список
Дерево обсуждения
Re: RULE vs TRIGGER will trillich <will@serensoft.com>
Re: RULE vs TRIGGER Stephan Szabo <sszabo@megazone23.bigpanda.com>
Re: RULE vs TRIGGER will trillich <will@serensoft.com>
On Tue, Jul 31, 2001 at 11:05:37AM -0700, Stephan Szabo wrote:
> I meant using a lock table statement explicitly at the
> beginning of the trigger (LOCK TABLE tbl; -- possibly
> would have to be through execute, I'm not sure) which
> I would presume would mean that the "second" would 
> have to wait at that point until the first transaction
> finished completely.  Of course this cuts down your
> concurrency as only one transaction calling this would
> be able to run and the rest would have to wait.

hmm. so, how about

	create rule
		add_new_item as
		on insert to fake_view
		do instead (
			begin work;
			lock table _real_data;
			insert into _real_data ( ... ) values ( ... );
			commit work;
		);

would something like this be legal...? (i.e. what's the syntax
necessary to make it happen behind-the-scenes?)

-- 
Khan said that revenge is a dish best served cold. I think 
sometimes it's best served hot, chunky, and foaming. 
	- P.J.Lee ('79-'80)
 
will@serensoft.com
http://sourceforge.net/projects/newbiedoc -- we need your brain!
http://www.dontUthink.com/ -- your brain needs us!
В списке pgsql-general по дате отправления
От: Nicholas Piper
Дата:
От: brichardson@lineone.net (Bruce Richardson)
Дата:
Сообщение: Re: Sequences and inheritance
FAQ