Re: how to get trigger start function not procedure - Mailing list pgsql-novice

From chris Günther
Subject Re: how to get trigger start function not procedure
Date
Msg-id 20001230145405.0d5d082d.guenther@uscreen.de
Whole thread Raw
In response to Re: how to get trigger start function not procedure  ("rob" <rob@cabrion.com>)
Responses Re: Re: how to get trigger start function not procedure
Re: Re: how to get trigger start function not procedure
List pgsql-novice
On Sat, 30 Dec 2000 08:28:52 -0500
"rob" <rob@cabrion.com> wrote:

> create function set_timestamp() returns opaque as
> 'begin
> new.timestamp := now();
> new.user := getpgusername()
> end if;
> return new;
> end;' language 'plpgsql';
>
> create trigger MyUpdateTrigger before insert or update on YourTable for each
> row execute procedure set_timestamp;
>
>

Hi and thanks a lot for your answer. Now it seems I have another problem:
When I try to follow your example - slightly changed to fit my needs -
I get the message:

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

Does this meen my installation doen't support plpgsql? I have installed
pSQL on a RedHat 6.2 System and used moreless the defaults when compiling
it.

How can I find out what languages are available for my installation and
should plpgsql not be part of every installation

    chris

pgsql-novice by date:

Previous
From: "rob"
Date:
Subject: Re: how to get trigger start function not procedure
Next
From: "Oliver Elphick"
Date:
Subject: Re: Re: how to get trigger start function not procedure