Received: from davinci.ethosmedia.com (davinci.ethosmedia.com [209.10.40.250]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f9EIsEr77821 for ; Sun, 14 Oct 2001 14:54:14 -0400 (EDT) (envelope-from josh@agliodbs.com) Received: from [209.10.40.250] (account ) by davinci.ethosmedia.com (CommuniGate Pro WebUser 3.4.1) with HTTP id 147570; Sun, 14 Oct 2001 11:54:10 -0700 From: "Josh Berkus" Subject: Re: referencial conlumn contraints and inheritance To: sfbarbee@yahoo.com, pgsql-sql@postgresql.org X-Mailer: CommuniGate Pro Web Mailer v.3.4.1 Date: Sun, 14 Oct 2001 11:54:10 -0700 Message-ID: In-Reply-To: <20011014112832.02352E83@station1.osa.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="_===147570====davinci.ethosmedia.com===_" X-Archive-Number: 200110/172 X-Sequence-Number: 5127 This is a multi-part MIME message --_===147570====davinci.ethosmedia.com===_ Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 8bit Stuart, >   I am not sure where to post this.  This may be more of a wishlist > item > than a usage question.  I am new to postgresql 7.1.  Table > inheritance > in postgres seems wonderfull.  Is there the capability now or any > plans to extend support for inherited tables in column constraints. > One > example is a travel db where several tables are defined as: There have been, as I understand it, several improvements made to inheritance and constraints in 7.2 (released soon, really!). However, you're potentially in for a world of painful workarounds here. REFERENCES constraints are part of a Relational DBMS system; Inheritance is an OODB concept. The two do not, IMHO, mix easily. Further, current implementations of table inheritance are largely proprietary, meaning that your application becomes impossible to part across platforms. If I were designing your database, I would forget about inheritance, and build it completely relationally, either with an tree-structured Areas table keyed to area subtypes, or with heirarchical tables of country --> region --> province --> city etc. Which structure you use depends largely on the rest of the application. However, keep in mind that a lot of people (the Postgres core team included) do not agree with me about inheritance and its limitations. -Josh ______AGLIO DATABASE SOLUTIONS___________________________ Josh Berkus Complete information technology josh@agliodbs.com and data management solutions (415) 565-7293 for law firms, small businesses fax 621-2533 and non-profit organizations. San Francisco --_===147570====davinci.ethosmedia.com===_ Content-Type: text/plain Content-Disposition: attachment; filename="" Content-Transfer-Encoding: base64 DQo= --_===147570====davinci.ethosmedia.com===_ Content-Type: text/plain Content-Disposition: attachment; filename="" Content-Transfer-Encoding: base64 DQo= --_===147570====davinci.ethosmedia.com===_ Content-Type: text/plain Content-Disposition: attachment; filename="" Content-Transfer-Encoding: base64 DQo= --_===147570====davinci.ethosmedia.com===_--