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). ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html