Return-Path: pg_adm@postgres.berkeley.edu
Received: by postgres.Berkeley.EDU (5.61/1.29)
	id AA00682; Fri, 4 Dec 92 09:00:09 -0800
Message-Id: <9212041700.AA00682@postgres.Berkeley.EDU>
From: "Manoj K. Jain" <mjain@bronze.ucs.indiana.edu>
Subject: Postquel function question..
To: postgres@postgres.berkeley.edu
Sender: pg_adm@postgres.berkeley.edu
To: postgres@postgres.berkeley.edu
Date: Fri, 4 Dec 1992 12:01:13 -0500 (EST)
X-Mailer: ELM [version 2.4 PL13]
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Content-Length: 1289      

Hello,
	What is the problem with this? Why am I getting a syntax
error? Thanks!
-- Manoj
===========================================================================
* define function sal_lookup
        (language = "postquel", returntype = int4)
        arg is (text)
        as "retrieve (EMP.salary) where EMP.name = $1" \g

Query sent to backend is "define function sal_lookup    (language = "postquel", returntype = int4)      arg is (text)   as "retrieve (EMP.salary) where EMP.name = $1" "
DEFINE
Go 

* retrieve (EMP.name)
        where EMP.salary = sal_lookup("Joe") \g

Query sent to backend is "retrieve (EMP.name)   where EMP.salary = sal_lookup("Joe") "
NOTICE:Dec  4 11:50:27:type mismatch in invocation of function sal_lookup
WARN:Dec  4 11:50:27:no such attribute or function sal_lookup

Go
* retrieve (EMP.all) \g

Query sent to backend is "retrieve (EMP.all) "
---------------------------------------------------------
| name        | salary      | age         | dept        |
---------------------------------------------------------
| Sam         | 1200        | 29          | toy         |
---------------------------------------------------------
| Joe         | 1200        | 40          | shoe        |
---------------------------------------------------------

Go
*
