creating functions

From: Dale Walker <dale(at)icr(dot)com(dot)au>
To: pgsql-general(at)postgresql(dot)org
Subject: creating functions
Date: 2000-08-27 00:52:32
Message-ID: 39A86650.1849D5F4@icr.com.au
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi All,

I'm trying to create a function that takes an interval (in seconds)
and
returns HH:MM:SS similar to reltime() but not dividing down to num#
days,months etc...

anyway, I've been looking into the CREATE FUNCTION routines and
here I
struck a stumbling block.

I tried(from the doco):
----------------------------------------------------------
CREATE FUNCTION concat_text (text, text) RETURNS text AS '
BEGIN
RETURN $1 || $2;
END;
' LANGUAGE 'plpgsql';
----------------------------------------------------------

but I received this as the error:
----------------------------------------------------------
ERROR: Unrecognized language specified in a CREATE FUNCTION:
'plpgsql'. Recognized languages are sql, C, internal and the
created
procedural languages.
----------------------------------------------------------

I'm running PostgreSQL 7.0.2 on FreeBSD-4.1. I'm new to postgres
(just
migrating from mysql).

What I'm wondering:
1. Am I missing something basic and fundamental here??
2. Am I looking at the right doco.. I recall on the list a
few
weeks
back there was a coment about the wrong doco being used...

Any help is appreciated..

--
Dale Walker dale(at)icr(dot)com(dot)au
Independent Computer Retailers (ICR) http://www.icr.com.au
ICRnet http://www.icr.net.au

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Stephan Szabo 2000-08-27 01:01:30 Re: creating functions
Previous Message Bruce Guenter 2000-08-26 20:36:24 Re: Stripping a prefix