Subject: dumb question?

From: Carole Goble <[email-masked]>
Date: Mon, 8 Mar 93 12:01:32 -0800

I have a (probably) dumb question. How do I actually use a 
function that returns a class given an scalar argument?

eg:	define function large_pay
	(language = "postquel", returntype = setof emp)
	arg is (int4)
	as "retrieve (emp.all) where emp.salary > $1" \g

I've tried

	retrieve (emp.name, emp.salary) where large_pay(300) \g

Query sent to backend is "retrieve (emp.name, emp.salary) where large_pay(300) "
WARN:Mar  8 12:59:34:where clause must return type bool, not emp

I've tried using large_pay in the target list etc..

I guess I have to somehow use the result of large_pay to turn it into a
boolean expression but I'm not sure how.

Functions that take a class as an argument are fine as I can use the 
dot or bracket notation.

Thanks

Carole

---

From: <[email-masked]>
Date: Mon, 08 Mar 93 13:05:45 PST

> 	retrieve (emp.name, emp.salary) where large_pay(300) \g

retrieve (who = name(large_pay(300)))

					mike