Return-Path: mao
Received: by postgres.Berkeley.EDU (5.61/1.29)
	id AA02691; Tue, 25 Jun 91 16:45:57 -0700
Message-Id: <9106252345.AA02691@postgres.Berkeley.EDU>
From: mao@postgres.Berkeley.EDU (Mike Olson)
Subject: Re: composite objects
To: postgres@postgres.berkeley.edu
In-Reply-To: Your message of "Tue, 25 Jun 91 16:31:51 PST."
             <9106252331.AA02482@postgres.Berkeley.EDU> 
Date: Tue, 25 Jun 91 16:46:10 PDT

here's a way to make this happen; how it works should be clear from the
example.

	create EMP (name = char16, salary = int4, mgr_name = char16)

	define postquel function manager (EMP) returns EMP is
	    retrieve (e.all) from e in EMP where e.name = current.mgr_name

the 'define postquel function' declares a method on class EMP and adds a
virtual column, 'manager', to the class.  this isn't perfect, but will
do what you want at the cost of an additional key stored in each EMP
instance.

					mike olson
					postgres research group
					uc berkeley
					mao@postgres.berkeley.edu
