> I.e. "On an insert to news, if new.publish is not null, insert the new
> post's id into news_unpublished.

How about:

CREATE RULE newsrule AS
ON INSERT TO news
DO
  INSERT INTO news_unpublished
  SELECT NEW.id
  WHERE NEW.publishtime IS NOT NULL

-itai

Reply via email to