Re: [GENERAL] Retrieval of OO objects.

From: "Oliver Elphick" <olly(at)lfix(dot)co(dot)uk>
To: Chris Bitmead <chris(dot)bitmead(at)bigfoot(dot)com>
Cc: pgsql-general(at)postgreSQL(dot)org
Subject: Re: [GENERAL] Retrieval of OO objects.
Date: 1999-04-16 13:28:05
Message-ID: 199904161328.OAA16627@linda.lfix.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Chris Bitmead wrote:
>Is it possible in postgres to retrieve objects with differing fields,
>like in an object database? Like if I have
>
>CREATE TABLE aaa ( a text );
>
>CREATE TABLE bbb ( b text ) inherits (aaa);
>
>CREATE TABLE ccc ( c text ) inherits (aaa);
>
>SELECT * from aaa*;
>
>Is it possible to get the fields a and c returned on objects of type bbb
>and ccc? This is what an object database would do automatically.

No; your query on aaa* will return only field a, although it will include
all rows from aaa, bbb and ccc.

This is in line with standard OO treatment of inherited classes.
Class aaa only has a single feature, a; it knows nothing about additional
features of descendant classes.

--
Oliver Elphick Oliver(dot)Elphick(at)lfix(dot)co(dot)uk
Isle of Wight http://www.lfix.co.uk/oliver
PGP key from public servers; key ID 32B8FAA1
========================================
"But seek ye first the kingdom of God, and his
righteousness; and all these things shall be added
unto you." Matthew 6:33

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Thomas Good 1999-04-16 13:31:10 Re: [GENERAL] The WWW of PostgreSQL
Previous Message Oleg Broytmann 1999-04-16 13:14:30 PostgreSQL WWW: Software