agora inbox for postgres@postgres.berkeley.edu  
help / color / mirror / Atom feed
From: Mike Olson <mao@postgres.Berkeley.EDU>
To: postgres@postgres.berkeley.edu
Subject: Re: composite objects
Date: Tue, 25 Jun 91 16:46:10 PDT
Message-ID: <9106252345.AA02691@postgres.Berkeley.EDU> (raw)
In-Reply-To: <9106252331.AA02482@postgres.Berkeley.EDU>

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



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 using the --to and --cc options:
  reply via email

  To: postgres@postgres.berkeley.edu
  Cc: mao@postgres.Berkeley.EDU
  Subject: Re: composite objects
  In-Reply-To: <9106252345.AA02691@postgres.Berkeley.EDU>

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

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