function language type? - Mailing list pgsql-general

From Ian Turner
Subject function language type?
Date
Msg-id Pine.LNX.4.21.0007242232470.1667-100000@crafter.house
Whole thread Raw
Responses Re: function language type?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I am trying to write a function in the SQL procedural language. But when I
use type plpgsql, as the user's guide says, I get this error:

ERROR:  Unrecognized language specified in a CREATE FUNCTION: 'plpgsql'.
Recognized languages are sql, C, internal and the created procedural
languages.

If I try setting the language to type sql, I get:

ERROR:  parser: parse error at or near "alias"

The only occurance of the string alias is in these four lines, which are
below a DECLARE line, which is the first line of the function:

        osec        ALIAS FOR $1;
        dsec        ALIAS FOR $2;
        who        ALIAS FOR $3;
        avoids        ALIAS FOR $4;

And yes, the function has four parameters.

Any ideas?

Ian

P.S. Please keep the CC on this message, I want replies at both mailboxes.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.1 (GNU/Linux)
Comment: For info see http://www.gnupg.org

iD8DBQE5fSeJfn9ub9ZE1xoRAkshAJ9zzq3oq2Qu4NsICfNJmwelA58/YgCfcFyc
KjcG5GHUjCZOeXlURbDOqk4=
=Gn4j
-----END PGP SIGNATURE-----


pgsql-general by date:

Previous
From: Jeff Davis
Date:
Subject: Mutable tables
Next
From: Thomas Lockhart
Date:
Subject: Re: Only updating part of a column