Search Postgresql Archives

Re: Immutable attributes?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Apr 26, 2005 at 09:49:05AM -0400,
 Mario Soto Cordones <msotocl@xxxxxxxxx> 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;

---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives?

               http://archives.postgresql.org

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux