pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Chris Bitmead <chris@tech.com.au>
Cc: pgsql-hackers@postgresql.org
Cc: pgsql-sql@postgresql.org
Cc: pgsql-general@postgresql.org
Subject: Re: [HACKERS] inheritance
Date: Wed, 21 Jul 1999 10:59:36 -0400
Message-ID: <1812.932569176@sss.pgh.pa.us> (raw)
In-Reply-To: <3795C957.CFA11B91@tech.com.au>

Chris Bitmead <chris@tech.com.au> writes:
> To me this is a much better idea. In any proper OO application you would
> be using the "*" in postgres 99% of the time - that being the whole
> point of OO. Does any consideration want to be given to making the same
> change while there's not too many people using the inheritance feature?

What makes you think there's "not too many people" using inheritance?
Furthermore, if we did that it would break the code of people who
*didn't* think they were using inheritance, except as a means of
copying table definitions (which I do a lot, btw).

I don't think we can reverse the default on that at this late date.

> The other thing Informix does is automatically propagate all attributes
> including indexes, constraints, pretty much everything to sub-classes.
> Again.. I think this is the right thing. Any thoughts?

I'd be inclined to agree on that, or at least say that we ought to
provide a simple way of making it happen.  But the right semantics
are not always obvious.  For example, if the ancestor has a SERIAL
column, do the derived tables get their own sequence objects or
share the ancestor's?  Does your answer change if the serial column
was created "by hand" with a "DEFAULT nextval('some_sequence')" clause?
I suspect that any way we jump on this sort of question will be wrong
for some apps, so it should be possible to suppress system copying of
attributes...

			regards, tom lane



view thread (18+ messages)  latest in thread

Message-ID: <1812.932569176@sss.pgh.pa.us>
Permalink:  ../1812.932569176@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1812.932569176@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, chris@tech.com.au, pgsql-hackers@postgresql.org, pgsql-general@postgresql.org
  Subject: Re: [HACKERS] inheritance
  In-Reply-To: <1812.932569176@sss.pgh.pa.us>

* 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