X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [64.117.224.130]) by svr1.postgresql.org (Postfix) with ESMTP id D9157D1B509 for ; Thu, 2 Oct 2003 02:16:09 +0000 (GMT) Received: from svr1.postgresql.org ([64.117.224.193]) by localhost (neptune.hub.org [64.117.224.130]) (amavisd-new, port 10024) with ESMTP id 71371-05 for ; Wed, 1 Oct 2003 23:15:23 -0300 (ADT) Received: from web41015.mail.yahoo.com (web41015.mail.yahoo.com [66.218.93.14]) by svr1.postgresql.org (Postfix) with SMTP id 46B66D1B500 for ; Wed, 1 Oct 2003 23:15:19 -0300 (ADT) Message-ID: <20031002021523.96380.qmail@web41015.mail.yahoo.com> Received: from [66.108.25.20] by web41015.mail.yahoo.com via HTTP; Wed, 01 Oct 2003 19:15:23 PDT Date: Wed, 1 Oct 2003 19:15:23 -0700 (PDT) From: Theodore Petrosky Subject: help with rule and notification To: pgsql-sql@postgresql.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at postgresql.org X-Spam-Status: No, hits=0.9 tagged_above=0.0 required=5.0 tests=RCVD_IN_OSIRUSOFT_COM X-Spam-Level: X-Archive-Number: 200310/19 X-Sequence-Number: 15419 I don't know if this is the correct forum for this question but I will start here... I have a job tracking system that I am developing with postgresql and mac os x. I have all the pieces in place (mostly) but i am having a problem with notify.. I am trying to set up things so that two (or more) people can view the same job data, and if one client updates the data the others will be notified and can update their displays. I got the notify to work (it wasn't too difficult) but now I am trying to figure out the logic. I mean the only examples I see have rules that say.. update table1, then the rule updates table2 and sends a notify to anyone listening. The information passed in the notify is a reference to the second table. Ok so far. I am having a problem with the second table update. When I update table1 (update table1 set info ='info' where jobno = '10023') how do I pick up the jobno variable in my rule? something like create rule r1 as on update to table1 do (update table2 set jobno = table1.jobno; notify table2;) so anyone listening for notifications on table2 can ask table2 for the jobno that was updated. then if they were viewing that jobno, update their display. if not just ignore the notify. maybe i'm going about this all wrong and someone can point me in a better direction. I am open to any solution... Thanks.. Ted __________________________________ Do you Yahoo!? The New Yahoo! Shopping - with improved product search http://shopping.yahoo.com