Re: simple function syntax

From: Culley Harrelson <culleyharrelson(at)yahoo(dot)com>
To: "Robert B(dot) Easter" <reaster(at)comptechnews(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: simple function syntax
Date: 2001-01-28 01:12:16
Message-ID: 20010128011216.96946.qmail@web9605.mail.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I ran createlang successfully and I'm still getting
compile errors on basic plpgsql functions (sql
functions work).I'm assuming I have to do something
like:

create trusted procedural language plpgsql
handler = ????

do I need to write a handler function for plpgsql?

Boy this is making me feel really lame :)

Culley

--- "Robert B. Easter" <reaster(at)comptechnews(dot)com>
wrote:
> Load the procedural language from the shell:
>
> createlang plsql <dbname>
>
> On Friday 26 January 2001 00:55, Culley Harrelson
> wrote:
> > OK trying to write my first function and its
> blowing
> > up at compile. What's wrong with this:
> >
> > CREATE FUNCTION test_function(int4) RETURNS int4
> AS '
> > DECLARE
> > test ALIAS FOR $1;
> > BEGIN
> > RETURN test;
> > END;
> > ' LANGUAGE 'plpgsql';
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! Auctions - Buy the things you want at great
> prices.
> > http://auctions.yahoo.com/
>
> --
> -------- Robert B. Easter reaster(at)comptechnews(dot)com
> ---------
> -- CompTechNews Message Board
> http://www.comptechnews.com/ --
> -- CompTechServ Tech Services
> http://www.comptechserv.com/ --
> ---------- http://www.comptechnews.com/~reaster/
------------

__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices.
http://auctions.yahoo.com/

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2001-01-28 01:28:45 Re: simple function syntax
Previous Message Robert B. Easter 2001-01-28 00:13:56 Re: Outer Joins