agora inbox for postgres@postgres.berkeley.edu
help / color / mirror / Atom feedFrom: Gregory Klein <klein@imasun.lbl.gov>
To: postgres@postgres.berkeley.edu
Subject: composite objects
Date: Tue, 25 Jun 91 16:31:51 -0700
Message-ID: <9106252331.AA02482@postgres.Berkeley.EDU> (raw)
In the Postgres tutorial, the following composite object was defined:
create EMP(name=c12,salary=float8,age=int4,dept=c12,manager=EMP)
and attributes were appended to the object using
append to EMP (name="Sam",salary=1000,age=40,dept="shoe",
manager=mgr-lookup("shoe"))
where mgr-lookup was defined as the function by
define function mgr-lookup(c12) returns EMP as
retrieve (EMP.all) where EMP.name=DEPT.manager and DEPT.name=$1
Since Postgres 2.1 does not appear to be able to define this sort of
function, is there a way to populate composite objects?
Thanks,
Greg Klein
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: klein@imasun.lbl.gov
Subject: Re: composite objects
In-Reply-To: <9106252331.AA02482@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