Re: update in rule

From: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
To: Dmitry Morozovsky <marck(at)rinet(dot)ru>
Cc: Nicolas KOWALSKI <Nicolas(dot)Kowalski(at)imag(dot)fr>, pgsql-admin(at)postgresql(dot)org
Subject: Re: update in rule
Date: 2001-10-18 19:14:08
Message-ID: Pine.BSF.4.21.0110181212080.27862-100000@megazone23.bigpanda.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-sql

On Thu, 18 Oct 2001, Dmitry Morozovsky wrote:

> On Wed, 17 Oct 2001, Stephan Szabo wrote:
>
> SS> Use a trigger instead, something like
> SS>
> SS> create function adresses_trigger() returns opaque as '
> SS> begin
> SS> NEW.date_maj := now();
> SS> return NEW;
> SS> end;' language 'plpgsql';
>
> hmm. it seems defaul pgsql installation does not contains definition for
> plpgsql language:

Yeah, it's not added by default.

> My installation is 7.1.3 under FreeBSD 4-stable. Is it somehow my fault or
> does it need to manually do something like

The easiest way is to use the createlang script from the shell.
createlang plpgsql <database>

I think if you add the hander to template1 any new databases
will get it automatically (you'll have to add it to any existing
dbs though).

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Stephan Szabo 2001-10-18 19:25:14 Re: Doing a regexp-based search/replace?
Previous Message Tom Lane 2001-10-18 19:08:08 Re: delete/vacuum not freeing disk space

Browse pgsql-sql by date

  From Date Subject
Next Message Stephan Szabo 2001-10-18 19:25:14 Re: Doing a regexp-based search/replace?
Previous Message Tom Lane 2001-10-18 18:52:46 Re: Doing a regexp-based search/replace?