Ok,

I decided to learn more about postgresql.

My challenge:
Given an oid, efficiently determine the most derived class the instance
belongs to.

My intended solution is to add an extra attribute to each tuple
which contains the oid of the most derived class it belongs to.

On inserting a tuple I set this field to the value of the table/class used
for the
insert.

Using with a negative index I can allways retreive the oid of
the most derived class.

How to proceed?
Step: 1
Add the new field to the HeapTupleData struct in htup.h.

Step: 2
Modify inserting function to add the oid of the class into which
the insertion takes place.

Step 3
???

Step 4

Can anyone give clues as whatelse I will have to do to get this to work?

Thanks,
Maurice


Wed, 25 Feb 1998 16:27:38 +0100
"Maurice Gittens" <mgittens@gits.nl>
Adding a field to each tuple
> 
> Ok,
> 
> I decided to learn more about postgresql.
> 
> My challenge:
> Given an oid, efficiently determine the most derived class the instance
> belongs to.
> 
> My intended solution is to add an extra attribute to each tuple
> which contains the oid of the most derived class it belongs to.

This is a lot of overhead for places it is not needed.

-- 
Bruce Momjian                          |  830 Blythe Avenue
maillist@candle.pha.pa.us              |  Drexel Hill, Pennsylvania 19026
  +  If your life is a hard drive,     |  (610) 353-9879(w)
  +  Christ can be your backup.        |  (610) 853-3000(h)

Wed, 25 Feb 1998 14:04:42 -0500 (EST)
Bruce Momjian <maillist@candle.pha.pa.us>
Re: [HACKERS] Adding a field to each tuple