Skip site navigation (1) Skip section navigation (2)

Re: how to get trigger start function not procedure

From: chris Gnther <guenther(at)uscreen(dot)de>
To: "rob" <rob(at)cabrion(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: how to get trigger start function not procedure
Date: 2000-12-30 13:54:05
Message-ID: 20001230145405.0d5d082d.guenther@uscreen.de (view raw or flat)
Thread:
Lists: pgsql-novice
On Sat, 30 Dec 2000 08:28:52 -0500
"rob" <rob(at)cabrion(dot)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

In response to

Responses

pgsql-novice by date

Next:From: Albert REINERDate: 2000-12-30 17:54:57
Subject: Re: Re: how to get trigger start function not procedure
Previous:From: robDate: 2000-12-30 13:28:52
Subject: Re: how to get trigger start function not procedure

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group