Re: [HACKERS] commit callback, request, SOLVED

2006-04-06 Thread Tom Lane
=?ISO-8859-2?Q?Horv=E1th_S=E1ndor?= <[EMAIL PROTECTED]> writes: > In the documentation: > "CREATE CONSTRAINT TRIGGER is used within CREATE TABLE/ALTER TABLE and > by pg_dump to create the special triggers for referential integrity. It > is not intended for general use." > What means "it is not i

Re: [HACKERS] commit callback, request, SOLVED

2006-04-06 Thread Horváth Sándor
Hi! I have needed deferrable check, but it is not implemented. I thought, the deferrable trigger is the solution, but it is exists only for referential integrity. I have started to study the postgresql source code for implementing deferrable triggers for any purpose. Now i try the constraint

Re: [HACKERS] commit callback, request

2006-04-05 Thread Christopher Kings-Lynne
The only solution I know if is this patch: http://gorda.di.uminho.pt/community/pgsqlhooks/ Chris Pavel Stehule wrote: Hello Is possible make transaction commit trigger without patching code now? I finding way , but all usable interfaces are static. I remember on diskussion about it and abou

Re: [HACKERS] commit callback, request, SOLVED

2006-04-05 Thread Pavel Stehule
Refered triggers works well, better than I expected. It's not equal NOTIFY, but it works. Thank You Pavel Stehule CREATE OR REPLACE FUNCTION dbms_alert._defered_signal() RETURNS trigger AS $$ BEGIN PERFORM dbms_alert._signal(NEW.event, NEW.message); DELETE FROM ora_alerts WHERE id=NEW.id;

Re: [HACKERS] commit callback, request

2006-04-05 Thread Pavel Stehule
"Pavel Stehule" <[EMAIL PROTECTED]> writes: > Is possible make transaction commit trigger without patching code now? You can get pretty close with a deferred trigger. I don't think there's any way to have a guaranteed "at commit" trigger --- as soon as (1) there are two of them and (2) one can g

Re: [HACKERS] commit callback, request

2006-04-05 Thread Tom Lane
"Pavel Stehule" <[EMAIL PROTECTED]> writes: > Is possible make transaction commit trigger without patching code now? You can get pretty close with a deferred trigger. I don't think there's any way to have a guaranteed "at commit" trigger --- as soon as (1) there are two of them and (2) one can ge

[HACKERS] commit callback, request

2006-04-05 Thread Pavel Stehule
Hello Is possible make transaction commit trigger without patching code now? I finding way , but all usable interfaces are static. I remember on diskussion about it and about changes in LISTEN/NOTIFY implementation. Is there any progress? I need it for simulation of Oracle dbms_alert.signal