Re: inheritance vs 1-1 relationship

From: Reece Hart <rkh(at)gene(dot)COM>
To: culley harrelson <culley(at)ml1(dot)net>
Cc: pg-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: inheritance vs 1-1 relationship
Date: 2003-05-19 23:00:35
Message-ID: 1053385235.5829.1247.camel@tallac
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Sat, 2003-05-17 at 21:36, culley harrelson wrote:
> Are there any drawbacks to
> inheritance other than a decrease in portability?

Inheritance is very nifty and, more importantly, better represents the
data of some problems. I love it.

James Gregory and I have just had a short thread re: foreign keys into
inherited tables which you may wish to read (see archive). It's not a
problem per se, but rather a minor shortcoming (IMO).

Some things to note with inheritance:
- indices are not created on subtable columns automatically
- the super- & subtables are distinct tables
- select really just does a union select on subtables
- alter and drop cascade to subtables

I haven't had any problems with inheritance and mostly think it's
wonderful.

-Reece

--
Reece Hart, Ph.D. rkh(at)gene(dot)com, http://www.gene.com/
Genentech, Inc. 650/225-6133 (voice), -5389 (fax)
Bioinformatics and Protein Engineering
1 DNA Way, MS-93 http://www.in-machina.com/~reece/
South San Francisco, CA 94080-4990 reece(at)in-machina(dot)com, GPG: 0x25EC91A0

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Ron Snyder 2003-05-19 23:01:56 Re: disk space usage enlarging despite vacuuming
Previous Message Jim C. Nasby 2003-05-19 22:35:17 Re: PostgreSQL Performance on OpenBSD