Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id EEBD0476F79 for ; Wed, 29 Jan 2003 14:56:13 -0500 (EST) Received: from news.hub.org (news.hub.org [64.49.215.80]) by postgresql.org (Postfix) with ESMTP id 79CF3476F60 for ; Wed, 29 Jan 2003 14:56:13 -0500 (EST) Received: by news.hub.org (Postfix, from userid 8) id 6465043B252; Wed, 29 Jan 2003 14:56:13 -0500 (EST) From: Neal Lindsay X-Newsgroups: comp.databases.postgresql.sql Subject: Inheritence and Integrity Date: Wed, 29 Jan 2003 14:56:10 -0500 Organization: Hub.Org Networking Services (http://www.hub.org) Lines: 32 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@news.hub.org User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:1.2.1) Gecko/20021130 X-Accept-Language: en-us, en To: pgsql-sql@postgresql.org X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200301/488 X-Sequence-Number: 11353 I am creating a database that will keep track of several different types of 'events'. I am toying with the idea of making a base 'class' table for the tables because a lot of the information will be the same (also there will probably be times I just need to get the basic information about events regardless of their type). My question is: will triggers and rules on the parent table fire when I insert data in the child tables? Are there any other potential pitfalls? Thank you, -Neal Lindsay P.S. Here is a simplified example of my schema: CREATE TABLE parenttable ( recordid SERIAL PRIMARY KEY, recordname text ); CREATE TABLE childtablea ( afield int4 ) INHERITS parenttable; CREATE TABLE childtableb ( bfield text ) INHERITS parenttable; CREATE TABLE extrainfo ( extrainfoid SERIAL PRIMARY KEY, record_fkey int4 NOT NULL REFERENCES parenttable(recordid), extrainfotext text );