pg.ddx.io  postgres@postgres.berkeley.edu mailing list archive  
help / color / mirror / Atom feed
A few questions
1+ messages / 1 participants
[nested] [flat]

* A few questions
@ 1992-09-29 09:27  M.S.Jackson <cm1914@scitsc.wolverhampton.ac.uk>
  0 siblings, 0 replies; 1+ messages in thread

From: M.S.Jackson @ 1992-09-29 09:27 UTC (permalink / raw)
  To: postgres@postgres.berkeley.edu


I have two very straightforward questions:

1) The following script creates and uses a function to find the names
   of all highly paid employees. How would I alter it to find all the
   attributes of highly paid employees?


spog > create EMP (name=text, salary=int4, age=int4,dept=char16)
CREATE successful
spog > append EMP(name="JOE",salary=1400,age=40,dept="shoe")
APPEND 54708 successful
spog > append EMP(name="Sam",salary=1200,age=29,dept="toy")
APPEND 54720 successful
spog > append EMP(name="Bill",salary=1200,age=29,dept="candy")
APPEND 54721 successful
spog > define function high_pay (language="postquel", returntype = setof EMP)
as "retrieve (EMP.all) where EMP.salary > 1200"
DEFINE successful
spog > retrieve (names=name(high_pay()))
 JOE         

2) The paper entitled "The POSTGRES Data Model" by Rowe and Stonebraker
   talks about relation attributes of type procedure. It gives an example
   of a column declared with type postquel. Has this idea been abandoned?


-- 

*****************************************************************************
*                                                                           *
*  Mike Jackson                                                             *
*  Reader in Software Engineering                                           *
*  School of Computing and Information Technology                           *
*  University of Wolverhampton                                              *
*  Wulfruna St.                              Phone: +44 902 322194          *
*  Wolverhampton WV1 1LY                     Fax:   +44 902 322268          *
*  UNITED KINGDOM                            e-mail: cm1914@sysa.wlv.ac.uk  *
*                                                                           *
*****************************************************************************



^ permalink  raw  reply  [nested|flat] 1+ messages in thread


only message in thread

Thread overview: 1+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
1992-09-29 09:27 A few questions M.S.Jackson <cm1914@scitsc.wolverhampton.ac.uk>

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