pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: chester c young <chestercyoung@yahoo.com>
To: Robert Paulsen <robert@paulsenonline.net>
To: pgsql-sql@postgresql.org
Subject: Re: Question re: relational technique
Date: Sun, 12 Mar 2006 09:29:03 -0800 (PST)
Message-ID: <20060312172903.6034.qmail@web54305.mail.yahoo.com> (raw)
In-Reply-To: <200603121111.17147.robert@paulsenonline.net>

--- Robert Paulsen <robert@paulsenonline.net> 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 



view thread (5+ messages)  latest in thread

Message-ID: <20060312172903.6034.qmail@web54305.mail.yahoo.com>
Permalink:  ../20060312172903.6034.qmail@web54305.mail.yahoo.com/
Also on:    postgresql.org/message-id/20060312172903.6034.qmail@web54305.mail.yahoo.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: chestercyoung@yahoo.com, robert@paulsenonline.net
  Subject: Re: Question re: relational technique
  In-Reply-To: <20060312172903.6034.qmail@web54305.mail.yahoo.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox