Subject: Some problems with Postgres features

From: orestes appel <[email-masked]>
Date: Wed, 12 Feb 92 10:19:14 -0800

Hi everybody,

We are having serious problems operating with strings. Comparisons involving
this type don't work properly. Any idea?

  * retrieve (EMP.all) where EMP.name="Sam"
  
  \g
  
  Query sent to backend is "retrieve (EMP.all) where EMP.name="Sam"  "
  WARN:Feb 10 23:25:44:OperatorDef: no operator =
   
Defining Postquel functions don't work either for us. We are following
the syntax indicated in the user's manual (page 9). Actually it's the
example used there.

  * define function pay 
  (language = "postquel", returntype=EMP)
  as 
  retrieve (EMP.all) where EMP.salary 1300.0
  \g
  
  Query sent to backend is "define function pay  (language = "postquel", returntype = EMP) as  retrieve (EMP.all) where EMP.salary 1300.0 "
  WARN:Feb 10 23:27:41:no zero argument postquel functions

Any pointers to what the problem is?

Thanks in advance.

	Orestes Appel
	Dan Jacobson
	Manoj Jain

---

From: postarch (Postgres Mailing Archive)
Date: Fri, 14 Feb 92 11:36:16 PST

>   WARN:Feb 10 23:25:44:OperatorDef: no operator =

This error message indicates that there is no operator = with the left
argument type of EMP.name.  Assuming that EMP.name is of type char16 or
text, my first guess would be that someone has been messing around with
the system catalogs.

>   retrieve (EMP.all) where EMP.salary 1300.0

The manual syntax is incorrect.  It should be:

	define function pay (language = "postquel", returntype=EMP)
	arg is (EMP)
	as retrieve (EMP.all) where EMP.salary = 1300.0

Jeff Meredith
[email-masked]

---

From: postarch (Postgres Mailing Archive)
Date: Fri, 14 Feb 92 13:04:02 PST

> 	as retrieve (EMP.all) where EMP.salary = 1300.0

I overlooked the intended action of the manual's postquel 
function.  It wanted a single set of employees whereas 
my function defines this set once for each employee.

The problem is that the support for postquel functions is incomplete.
Currently you must give the associated class as the first argument where
in this case you would like not to.  This type of function will be supported
in version 4.

Jeff Meredith