Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] Re: PRIMARY KEY & INHERITANCE (fwd)

From: Chris Bitmead <chrisb(at)nimrod(dot)itg(dot)telstra(dot)com(dot)au>
To: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
Cc: pgsql-general(at)hub(dot)org, "pgsql-hackers(at)postgreSQL(dot)org" <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: [HACKERS] Re: PRIMARY KEY & INHERITANCE (fwd)
Date: 2000-07-19 23:43:37
Message-ID: 39763D29.4ACC9575@nimrod.itg.telecom.com.au (view raw or flat)
Thread:
Lists: pgsql-generalpgsql-hackers
Stephan Szabo wrote:
> 
> Of course I had to be half asleep when I wrote the second paragraph of my
> response, since I totally missed he was using a serial.  The rest still
> applies though...
> 
> As an aside to Chris, what interactions do you expect between the OO stuff
> you've been working on and foreign key references?  I'm going to have to
> muck around with the trigger code to move to storing oids of tables and
> attributes rather than names, so I thought it might make sense to at least
> think about possible future interactions.

As a rule, anything that applies to a base class should also apply to
the sub-class automatically. For some things you may want to have the
option of excluding it, by something like the ONLY syntax of select, but
99% of the time everything should just apply to sub-classes.

Storing oids of attributes sounds like a problem in this context because
it may make it hard to relate these to sub-classes. I do really think
that the system catalogs should be re-arranged so that attributes have
two parts - the parts that are specific to that class, and the parts
that also apply to sub-classes. For example the type and the length
should probably apply to sub-classes. The attnum and the name should
probably be individual to each class in the hierarchy. (The name should
be individual to support subclass renaming to avoid naming conflicts,
like in the draft SQL3 and Eiffel). If it is in two parts then using the
oid of the common part would make it easy for your purposes.

In response to

Responses

pgsql-hackers by date

Next:From: Hiroshi InoueDate: 2000-07-19 23:45:39
Subject: RE: btree split logic is fragile in the presence of lar ge index items
Previous:From: Peter EisentrautDate: 2000-07-19 22:46:17
Subject: About these IPC parameters

pgsql-general by date

Next:From: Tom LaneDate: 2000-07-19 23:59:14
Subject: Re: Does CREATE FUNCTION... WITH (ISCACHABLE) work?
Previous:From: Joel BurtonDate: 2000-07-19 22:50:24
Subject: Re: Does CREATE FUNCTION... WITH (ISCACHABLE) work?

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group