agora inbox for postgres@postgres.berkeley.edu  
help / color / mirror / Atom feed
From: Mike Olson <mao@postgres.Berkeley.EDU>
To: postgres@postgres.berkeley.edu
Subject: Re: define function
Date: Wed, 24 Mar 1993 10:12:41 -0800
Message-ID: <9303241811.AA20584@postgres.Berkeley.EDU> (raw)
In-Reply-To: <9303241519.AA19596@postgres.Berkeley.EDU>

In message <9303241519.AA19596@postgres.Berkeley.EDU>you write:

> Define fucntion highpay (language="postquel", returntype=setof S)
> as retrieve (S.all) where S.salary>500  
> 
> I get an error message" "Syntax error at or near retrieve".  WHY??
> I am working on a project that is due soon and have had no luck
> with the define function command.  ANy help from anyone would be greatly apre
  +ciated.

because the function body must be enclosed in quotation marks.  see the
man page for define function.

reformulate as

define fucntion highpay (language="postquel", returntype=setof S)
    as "retrieve (S.all) where S.salary>500"



reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: postgres@postgres.berkeley.edu
  Cc: mao@postgres.Berkeley.EDU
  Subject: Re: define function
  In-Reply-To: <9303241811.AA20584@postgres.Berkeley.EDU>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox