Re: Immutable attributes? - Mailing list pgsql-general

From Stephane Bortzmeyer
Subject Re: Immutable attributes?
Date
Msg-id 20050426135451.GA31623@nic.fr
Whole thread Raw
In response to Re: Immutable attributes?  (Mario Soto Cordones <msotocl@gmail.com>)
List pgsql-general
On Tue, Apr 26, 2005 at 09:49:05AM -0400,
 Mario Soto Cordones <msotocl@gmail.com> wrote
 a message of 45 lines which said:

> Hi for all ,  plese a question ,this function can be write in pl/pgsql ???????

I do not understand, it IS pl/pgsql.

> > CREATE OR REPLACE FUNCTION check_immutable() RETURNS TRIGGER
> >     AS 'BEGIN
> >               IF NEW.id != OLD.id OR NEW.created != OLD.created THEN
> >                    RAISE EXCEPTION ''Change not allowed in that table'';
> >               END IF;
> >               RETURN NEW;
> >         END;'
> >     LANGUAGE PLPGSQL;

pgsql-general by date:

Previous
From: Mario Soto Cordones
Date:
Subject: Re: Immutable attributes?
Next
From: Richard_D_Levine@raytheon.com
Date:
Subject: Re: UltraSPARC versus AMD