Home > Archive > PostgreSQL Hacks > April 2006 > commit callback, request









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author commit callback, request
Pavel Stehule

2006-04-05, 9:33 am

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 function. Whole
dbms_alert package is similar our LISTEN/NOTIFY. Difference is dbms_alert is
server side solution and L/N is client side. Is any chance so this
interface will be in 8.2?

Regards
Pavel Stehule

____________________
____________________
____________________
_____
Don’t just search. Find. Check out the new MSN Search!
http://search.msn.click-url.com/go/...6ave/direct/01/


---------------------------(end of broadcast)---------------------------
TIP 2: Don't 'kill -9' the postmaster

Tom Lane

2006-04-05, 9:33 am

"Pavel Stehule" <pavel.stehule@hotmail.com> 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 get an error, the
transaction could fail after running an alleged "at commit" trigger.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

http://archives.postgresql.org

Pavel Stehule

2006-04-05, 11:34 am

>"Pavel Stehule" <pavel.stehule@hotmail.com> writes:
>
>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 get an error, the
>transaction could fail after running an alleged "at commit" trigger.
>
> regards, tom lane


hm. I don't have big problem with false notifications. Who want to use
dbms_alert have to calculate with this possibility. But triggers has
disadventage - I have to sometimes clean any table, which cary triggers :-(.
It's solution. I hope 8.2 will has any general mechanis. Is it possible
enhance SPI to parametrized NOTIFY? Default mode send message via libpq,
nonstandard raise any callback.

Thank You
Pavel

____________________
____________________
____________________
_____
Citite se osamele? Poznejte nekoho vyjmecneho diky Match.com.
http://www.msn.cz/


---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to majordomo@postgresql
.org so that your
message can get through to the mailing list cleanly

Christopher Kings-Lynne

2006-04-06, 3:28 am

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 about changes in LISTEN/NOTIFY implementation.
> Is there any progress?
>
> I need it for simulation of Oracle dbms_alert.signal function. Whole
> dbms_alert package is similar our LISTEN/NOTIFY. Difference is
> dbms_alert is server side solution and L/N is client side. Is any
> chance so this interface will be in 8.2?
>
> Regards
> Pavel Stehule
>
> ____________________
____________________
____________________
_____
> Don’t just search. Find. Check out the new MSN Search!
> http://search.msn.click-url.com/go/...6ave/direct/01/
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 2: Don't 'kill -9' the postmaster


--
Christopher Kings-Lynne

Technical Manager
CalorieKing
Tel: +618.9389.8777
Fax: +618.9389.8444
chris.kings-lynne@calorieking.com
www.calorieking.com


---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com