Re: [GENERAL] Question on notifications

2012-04-30 Thread Albe Laurenz
Alexander Reichstadt wrote: > From the documentation I was able to build a trigger firing upon deletion of a record a function that > delivers tablename_operation as a notification one needs to subscribe to. So in terminal I can say > LISTEN persons_delete and instantly will receive > > Asyn

Re: [GENERAL] Question on notifications

2012-04-30 Thread Alexander Reichstadt
Thanks, I had checked the example before but couldn't make sense out of it in terms of wrapping it in Objective-C. I left it in C now and it works fine. The trigger I am using now looks like this: CREATE FUNCTION notify_trigger() RETURNS trigger AS $$ DECLARE BEGIN IF ( TG_OP = 'INSERT' ) THE

Re: [GENERAL] QUestion on notifications

2012-04-30 Thread Alexander Reichstadt
Thanks, I had checked the example before but couldn't make sense out of it in terms of wrapping it in Objective-C. I left it in C now and it works fine. The trigger I am using now looks like this: CREATE FUNCTION notify_trigger() RETURNS trigger AS $$ DECLARE BEGIN IF ( TG_OP = 'INSERT' ) THE

Re: [GENERAL] Question on notifications

2012-04-30 Thread Alexander Reichstadt
Thank you. You don't get the error, because you called FOR EACH ROW EXECUTE, which I didn't. I fixed it, it all works now! Am 30.04.2012 um 14:58 schrieb Albe Laurenz: > CREATE TRIGGER t1_trig AFTER INSERT OR UPDATE OR DELETE ON t1 > FOR EACH ROW EXECUTE PROCEDURE notify_trigger(); signatur

Re: [GENERAL] Question on notifications

2012-04-30 Thread Albe Laurenz
Alexander Reichstadt wrote: > Thanks, I had checked the example before but couldn't make sense out of it in terms of wrapping it in > Objective-C. I left it in C now and it works fine. > > The trigger I am using now looks like this: > > CREATE FUNCTION notify_trigger() RETURNS trigger AS $$ > >

[GENERAL] Question on notifications

2012-04-29 Thread Alexander Reichstadt
Hi, From the documentation I was able to build a trigger firing upon deletion of a record a function that delivers tablename_operation as a notification one needs to subscribe to. So in terminal I can say LISTEN persons_delete and instantly will receive Asynchronous notification "perso