Received: from candle.pha.pa.us (candle.navpoint.com [162.33.245.46]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id eBK2qJ639568 for ; Tue, 19 Dec 2000 21:52:19 -0500 (EST) (envelope-from pgman@candle.pha.pa.us) Received: (from pgman@localhost) by candle.pha.pa.us (8.9.0/8.9.0) id VAA15229; Tue, 19 Dec 2000 21:52:09 -0500 (EST) From: Bruce Momjian Message-Id: <200012200252.VAA15229@candle.pha.pa.us> Subject: Re: Probable error on docs In-Reply-To: <91lbbp$vfe$1@news.tht.net> "from Steve Howe at Dec 18, 2000 01:45:46 pm" To: Steve Howe Date: Tue, 19 Dec 2000 21:52:09 -0500 (EST) CC: pgsql-docs@postgresql.org X-Mailer: ELM [version 2.4ME+ PL77 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-Archive-Number: 200012/61 X-Sequence-Number: 108 I think the docs are correct. showlace_log holds changes to shoelace_data. > Hi Folks, > > > At programmer\rules1139.htm, (Rules on INSERT, UPDATE and DELETE), > there are the following statments: > > CREATE TABLE shoelace_log ( > sl_name char(10), -- shoelace changed > sl_avail integer, -- new available value > log_who name, -- who did it > log_when datetime -- when > ); > > CREATE RULE log_shoelace AS ON UPDATE TO shoelace_data > WHERE NEW.sl_avail != OLD.sl_avail > DO INSERT INTO shoelace_log VALUES ( > NEW.sl_name, > NEW.sl_avail, > getpgusername(), > 'now'::text > ); > > In the RULE statment (the second one) there is a reference to a > [shoelace_data] relation. Shouldn't it be the name of the table just > created, [shoelace_log] ? > In the RULE statment there is also a refernce to [shoelace_log]. > I'm using the docs from the last snapshot. Files are dated 05/08/2000. > > > Best Regards, > Howe. > > > > > -- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610) 853-3000 + If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill, Pennsylvania 19026