Received: from mailo.vtcif.telstra.com.au (mailo.vtcif.telstra.com.au [202.12.144.17]) by hub.org (8.9.3/8.9.3) with ESMTP id WAA46772 for ; Wed, 2 Feb 2000 22:59:34 -0500 (EST) (envelope-from chrisb@nimrod.itg.telstra.com.au) Received: (from uucp@localhost) by mailo.vtcif.telstra.com.au (8.8.2/8.6.9) id OAA03192; Thu, 3 Feb 2000 14:59:02 +1100 (EST) Received: from maili.vtcif.telstra.com.au(202.12.142.17) via SMTP by mailo.vtcif.telstra.com.au, id smtpdlF2B6_; Thu Feb 3 14:58:49 2000 Received: (from uucp@localhost) by maili.vtcif.telstra.com.au (8.8.2/8.6.9) id OAA14254; Thu, 3 Feb 2000 14:58:48 +1100 (EST) Received: from localhost(127.0.0.1), claiming to be "mail.cdn.telstra.com.au" via SMTP by localhost, id smtpdybHvg_; Thu Feb 3 14:57:42 2000 Received: from lunitari.nimrod.itg.telecom.com.au (lunitari.nimrod.itg.telecom.com.au [192.53.254.48]) by mail.cdn.telstra.com.au (8.8.2/8.6.9) with ESMTP id OAA12263; Thu, 3 Feb 2000 14:57:41 +1100 (EST) Received: from nimrod.itg.telecom.com.au (majere [192.53.254.45]) by lunitari.nimrod.itg.telecom.com.au (8.9.1/8.9.3) with ESMTP id OAA10797; Thu, 3 Feb 2000 14:57:01 +1100 (EST) Sender: chrisb@nimrod.itg.telstra.com.au Message-ID: <3898FC60.E4436ED5@nimrod.itg.telecom.com.au> Date: Thu, 03 Feb 2000 14:56:16 +1100 From: Chris Bitmead Reply-To: chris@bitmead.com Organization: IBM Global Services X-Mailer: Mozilla 4.6 [en] (X11; I; SunOS 5.6 sun4u) X-Accept-Language: en MIME-Version: 1.0 To: Tom Lane CC: Bruce Momjian , chris@bitmead.com, "pgsql-hackers@postgreSQL.org" Subject: Re: [SQL] Re: [GENERAL] Proposed Changes to PostgreSQL References: <200002030257.VAA00457@candle.pha.pa.us> <24816.949549188@sss.pgh.pa.us> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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.