Received: from rasmus.uib.no (exim@rasmus.uib.no [129.177.12.30]) by hub.org (8.10.1/8.10.1) with ESMTP id e6REjxA22259 for ; Thu, 27 Jul 2000 10:45:59 -0400 (EDT) Received: from (wkst6) [194.248.181.116] by rasmus.uib.no with smtp (Exim 3.14) id 13Hov5-0003iG-00; Thu, 27 Jul 2000 16:45:56 +0200 Message-ID: <003601bff7d9$18cdd610$74b5f8c2@wkst6> From: "=?iso-8859-1?B?QW5kcukgTuZzcw==?=" To: References: <87k8e78yg9.fsf@matt.w80.math-hat.com> Subject: Conditional rule? Date: Thu, 27 Jul 2000 16:43:57 +0200 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2919.6700 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 X-Archive-Number: 200007/257 I've been looking through the material I have on postgreSQL, but can't seem to find an answer to my problem. Very simplied, my tables are something like this: create table news ( id serial, story text, publishtime timestamp ) create table news_unpublished ( news_id ) I wish to make rule looking something like this: create rule newsrule as on insert to news do if new.publishtime is not null insert into news_unpublished values(new.id); I.e. "On an insert to news, if new.publish is not null, insert the new post's id into news_unpublished. Is this possible? Thanks André Nęss