From: | Robert Staudinger <robson(at)stereolyzer(dot)net> |
---|---|
To: | pgsql-interfaces(at)postgresql(dot)org |
Subject: | Re: Composite datatypes, dynamic member fields |
Date: | 2002-05-13 09:08:18 |
Message-ID: | 1021280904.464.10.camel@ws224 |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-interfaces |
> I use inheritance in such a case.
> (see INHERITS in CREATE TABLE)
> Table with common columns as a base class
> and different tables for classes with
> inherited base class.
> Multiple and multilevel inheritanse possible.
The problem in my case is that even a group of objects which belong
together might not have even one common attribute.
One idea is to implement a . operator on a basic data type and return
the value
for the corresponding field from the "operator function".
E.g.
"select * from mytable where mytype.mymember='x'"
could call something like
mytype_member_read( mytype, member_name )
but I'm not sure which datatype member_name would be in this case.
Unfortunately I don't have any idea how to handle updates on such fields
with a user defined member access operator yet.
Does anybody have any advice on that?
Robert Staudinger
PS: Please excuse if this explanation doesn't make perfect sense to you
- it's a little hard for me to say in English what I mean.
From | Date | Subject | |
---|---|---|---|
Next Message | Robert Staudinger | 2002-05-13 13:41:57 | Re: Composite datatypes, dynamic member fields |
Previous Message | maxim lapeine | 2002-05-13 07:01:01 |