Re: [SQL] Re: [GENERAL] Proposed Changes to PostgreSQL

From: Chris Bitmead <chrisb(at)nimrod(dot)itg(dot)telstra(dot)com(dot)au>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, chris(at)bitmead(dot)com, "pgsql-hackers(at)postgreSQL(dot)org" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [SQL] Re: [GENERAL] Proposed Changes to PostgreSQL
Date: 2000-02-03 03:56:16
Message-ID: 3898FC60.E4436ED5@nimrod.itg.telecom.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers pgsql-sql

Tom Lane wrote:
> >>>> This bothers me. We return relational data, showing the same number of
> >>>> columns and types for every query. I don't think we want to change
> >>>> that, even for OO.
>
> My thought also. If we had a *real* object orientation, then a returned
> column would have an abstract data type that might correspond to an
> object supertype. Of course that just pushes the problem down a level:
> how does the application know what methods the returned object has?
> How can it even invoke those methods --- whatever code might exist
> for them would live on the server, presumably, not get shipped around
> in query results.

In (most) ODBMSes, the code for a class does NOT live in the database
server. (How
would you store a C++ binary in a database?).

What happens is when a query returns an object, some magic behind the
scenes
checks the type of the returned object (thus the need for the
"classname" column
or similar.) The magic behind the scenes then instantiates a C++ object
of
the correct class and populates all the data members from the query
results.

The application code is then free to make polymorphic calls on the
object
because ALL the fields are populated, not just those of the base class.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Chris Bitmead 2000-02-03 03:57:12 Re: [HACKERS] Re: [SQL] Proposed Changes to PostgreSQL
Previous Message Chris Bitmead 2000-02-03 03:48:46 Re: [GENERAL] Proposed Changes to PostgreSQL

Browse pgsql-hackers by date

  From Date Subject
Next Message Chris Bitmead 2000-02-03 03:57:12 Re: [HACKERS] Re: [SQL] Proposed Changes to PostgreSQL
Previous Message Chris Bitmead 2000-02-03 03:48:46 Re: [GENERAL] Proposed Changes to PostgreSQL

Browse pgsql-sql by date

  From Date Subject
Next Message Chris Bitmead 2000-02-03 03:57:12 Re: [HACKERS] Re: [SQL] Proposed Changes to PostgreSQL
Previous Message Chris Bitmead 2000-02-03 03:48:46 Re: [GENERAL] Proposed Changes to PostgreSQL