Re: Composite datatypes, dynamic member fields

Поиск
Список
Период
Сортировка
Искать
От
Robert Staudinger
Тема
Re: Composite datatypes, dynamic member fields
Дата
в 09:13:23
Msg-id
200205121010.MAA11603@mx0.int.fh-sbg.ac.at
Список
Дерево обсуждения
Re: Composite datatypes, dynamic member fields Robert Staudinger <robert.staudinger@fh-sbg.ac.at>

> 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 attributes.

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 TABLE where mytype.mymember='x'"
could call something like
mytype_member_access( mytype, member_name )

Unfortunately I don't have any idea how to handle updates on fields yet.

Does anybody have any advice on that?

Robert Staudinger
PS: Please excuse if this explanation doesn't make much sense to you - 
it's a little hard for me to say in English what I
mean.


В списке pgsql-interfaces по дате отправления
От: Bartus Levente
Дата:
Сообщение: Re: [HACKERS] internal voting
От: Bartus Levente
Дата:
Сообщение: Re: [HACKERS] internal voting
FAQ