Subject: Question On POSTGRES

From: "Caroline M. Paxson" <[email-masked]>
Date: Tue, 08 Jun 1993 14:34:27 -0700

Hi,
You ask how to use the function high_pay():

     define function high_pay
     (language = "postquel", returntype = set of EMP)
      as "retrieve (EMP.all) where EMP.salary > 50000" \g

You can say, for example,

   retrieve (name = name(high_pay()), sal = sal(high_pay()))

since high_pay() returns a set of tuples.  You CAN'T say

   retrieve (rich_guys = high_pay())

because you can't assign a complex type (namely the EMP tuples
returned by high_pay()) to a variable in the target list, YET.
I'm working on this now.

Carol Paxson
[email-masked]