pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Chris Bitmead <chrisb@nimrod.itg.telstra.com.au>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Bruce Momjian <pgman@candle.pha.pa.us>
Cc: chris@bitmead.com, "pgsql-hackers@postgreSQL.org" <pgsql-hackers@postgresql.org>
Subject: Re: [SQL] Re: [GENERAL] Proposed Changes to PostgreSQL
Date: Thu, 03 Feb 2000 14:56:16 +1100
Message-ID: <3898FC60.E4436ED5@nimrod.itg.telecom.com.au> (raw)
References: <200002030257.VAA00457@candle.pha.pa.us>
	<24816.949549188@sss.pgh.pa.us>

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.



view thread (68+ messages)  latest in thread

Message-ID: <3898FC60.E4436ED5@nimrod.itg.telecom.com.au>
Permalink:  ../3898FC60.E4436ED5@nimrod.itg.telecom.com.au/
Also on:    postgresql.org/message-id/3898FC60.E4436ED5@nimrod.itg.telecom.com.au

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-sql@postgresql.org
  Cc: chrisb@nimrod.itg.telstra.com.au, tgl@sss.pgh.pa.us, pgman@candle.pha.pa.us, pgsql-hackers@postgresql.org
  Subject: Re: [SQL] Re: [GENERAL] Proposed Changes to PostgreSQL
  In-Reply-To: <3898FC60.E4436ED5@nimrod.itg.telecom.com.au>
  References: <200002030257.VAA00457@candle.pha.pa.us> <24816.949549188@sss.pgh.pa.us> <3898FC60.E4436ED5@nimrod.itg.telecom.com.au>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox