Received: from asterix.hrz.tu-chemnitz.de (asterix.hrz.tu-chemnitz.de [134.109.132.84]) by hub.org (8.9.3/8.9.3) with ESMTP id SAA64557 for ; Thu, 26 Aug 1999 18:24:38 -0400 (EDT) (envelope-from enrico.scholz@wirtschaft.tu-chemnitz.de) Received: from gkar.ultra.csn.tu-chemnitz.de (actually ultra.csn.tu-chemnitz.de) by asterix.hrz.tu-chemnitz.de with Local SMTP (PP); Fri, 27 Aug 1999 00:24:06 +0200 Received: (from news@localhost) by gkar.ultra.csn.tu-chemnitz.de (8.9.3/8.9.3) id AAA18211 for pgsql-sql@postgresql.org; Fri, 27 Aug 1999 00:23:40 +0200 X-Authentication-Warning: gkar.ultra.csn.tu-chemnitz.de: news set sender to enrico.scholz@wirtschaft.tu-chemnitz.de using -f From: Enrico Scholz Subject: Inheritance and DELETE Date: 27 Aug 1999 00:23:40 +0200 Message-ID: To: pgsql-sql@postgresql.org Hi, to represent objects of a filesystem I am using these tables: --------------------- CREATE TABLE fsObject -- an abstract filesystem-object ( fsOid serial, name text NOT NULL, parent int -- a directory id ); CREATE TABLE files ( ) INHERITS (fsObject); CREATE TABLE directory -- can be the parent of a fsObject ( ) INHERITS (fsObject); ---------------------- Because chapter 9 (Inheritance) of the "User Guide" the documentation is saying "Many of the commands that we have already discussed -- select, update and *delete* -- support this "*" notation...", I tried to handle the deletion of a directory with this rule: ---------------------- CREATE RULE chg_fsO_on_dir_delete AS ON DELETE TO directory DO DELETE FROM fsObject* WHERE parent = OLD.fsOid; ---------------------- But PostgreSQL is complaining with the message 'ERROR: parser: parse error at or near "*"' What is to correct syntax for the "*" in a DELETE-statement? Enrico -- eMail: enrico.scholz@wirtschaft.tu-chemnitz.de talk: ensc@ultra.csn.tu-chemnitz.de