X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 1B6419DCCF6 for ; Sun, 12 Mar 2006 13:29:06 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 52995-03 for ; Sun, 12 Mar 2006 13:29:05 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from web54305.mail.yahoo.com (web54305.mail.yahoo.com [206.190.49.115]) by postgresql.org (Postfix) with SMTP id A3AA49DCC19 for ; Sun, 12 Mar 2006 13:29:03 -0400 (AST) Received: (qmail 6036 invoked by uid 60001); 12 Mar 2006 17:29:03 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=Message-ID:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=DICIs2LcZQ1SoHuYJfVRE4rAh9cFZm3ztMezSzGqr3E4uigcBbeDf1Ow8ZTxjFWXqS8ECwkscszpBDG8xUFL3Zj156fJu2nl1SLPwVJR7cMAFgQ/ZD6qwcPK37qbid72/wQn1MCY/VADRRJNi8XOgG23qDHopemDNtXMow8QPnk= ; Message-ID: <20060312172903.6034.qmail@web54305.mail.yahoo.com> Received: from [68.54.4.83] by web54305.mail.yahoo.com via HTTP; Sun, 12 Mar 2006 09:29:03 PST Date: Sun, 12 Mar 2006 09:29:03 -0800 (PST) From: chester c young Subject: Re: Question re: relational technique To: Robert Paulsen , pgsql-sql@postgresql.org In-Reply-To: <200603121111.17147.robert@paulsenonline.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.992 required=5 tests=[AWL=-0.366, DNS_FROM_RFC_ABUSE=0.479, DNS_FROM_RFC_WHOIS=0.879] X-Spam-Score: 0.992 X-Spam-Level: X-Archive-Number: 200603/176 X-Sequence-Number: 24522 --- Robert Paulsen wrote: > One problem with the above is that the list of attributes is fixed. I > am looking for a way to assign new, previously undefined, attributes to > items without changing the table structure. Is it ever appropriate to do > the following? > ... There are two ways for extending tables, one static and one dynamic. Your scheme is dynamic. You will have problems with typing and performance. What you really want is to be able to list more attributes, similar to attributes attached to a tag in html. If you want a base table that has, under different specified conditions, extra attributes, there are better techniques. IMHO the best solution is, for each condition, create a table containing the primary table's id plus the extra attributes; then join that to the base table; then write a view to cover it all; then write rules for dml. Sounds difficult but a cake walk once you've done it a few times. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com