Re: Trigger using function written in PL/PGSQL returns "Unrecognized language specified" - Mailing list pgsql-general

From Richard Huxton
Subject Re: Trigger using function written in PL/PGSQL returns "Unrecognized language specified"
Date
Msg-id 005001c09377$692caa20$1001a8c0@archonet.com
Whole thread Raw
In response to Trigger using function written in PL/PGSQL returns "Unrecognized language specified"  (Dan B <db@cyclonehq.dnsalias.net>)
List pgsql-general
From: "Dan B" <db@cyclonehq.dnsalias.net>

> I am writing my first trigger & function.

I'm about a week ahead of you, so if we were using MS products I'd be a
qualified trainer by now.

> First question:
> ---------------
> I can't get psql to take the function declaration.
>
> ds=# > CREATE FUNCTION trigger_insert_update_copay()
...
> ds-# LANGUAGE 'plpgsql'
> ds-# Error: ERROR:  Unrecognized language specified in a CREATE FUNCTION:
> 'plpgsql'.  Recognized languages are sql, C, internal and the created
> procedural languages.

You need to run "createlang plpgsql dbname" on the database first - man
createlang


> Here is my function:

Everything looks fine to the naked eye - one createlang and you're in
business I'd say.

- Richard Huxton


pgsql-general by date:

Previous
From: Alexander Jerusalem
Date:
Subject: 7.1 installation problem
Next
From: "Richard Huxton"
Date:
Subject: Re: RE: can't run pg_dump in sh script using crontab