Received: from hotmail.com (f91.law10.hotmail.com [64.4.15.91]) by postgresql.org (8.11.3/8.11.4) with ESMTP id f7FAGnP80078 for ; Wed, 15 Aug 2001 06:16:49 -0400 (EDT) (envelope-from mister_ics@hotmail.com) Received: from mail pickup service by hotmail.com with Microsoft SMTPSVC; Wed, 15 Aug 2001 03:16:46 -0700 Received: from 62.211.48.55 by lw10fd.law10.hotmail.msn.com with HTTP; Wed, 15 Aug 2001 10:16:46 GMT X-Originating-IP: [62.211.48.55] From: "Mister ics" To: JanWieck@Yahoo.com Cc: pgsql-sql@postgresql.org Subject: Re: on update restrict Date: Wed, 15 Aug 2001 10:16:46 Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1; format=flowed Message-ID: X-OriginalArrivalTime: 15 Aug 2001 10:16:46.0757 (UTC) FILETIME=[63B83D50:01C12573] X-Archive-Number: 200108/207 X-Sequence-Number: 4439 > > The behaviour is correct according to the SQL specifications. > RESTRICT (as well as NO ACTION) means, you cannot change the > primary key value of the referenced row. All other values can > be changed of course. > > So an attempt to > > UPDATE t1 SET id = 2 WHERE id = 1; > > is the thing prevented in your above example. > > >Jan > Hi Jan, Thank you , i understand now. Do you know a method to block the update of certain rows in a table not using the triggers ? I explain better: I have the needing to prevent the updating of a set of rows in a table. The first solution i can find is to use a boolean column (es. "Blocked") and rising a trigger on updating the table. The trigger checks if the row is updatable or not (checking the "Blocked" column). Is this the only (or better) way to do this ? Thanks, Silvio _________________________________________________________________ Scarica GRATUITAMENTE MSN Explorer all'indirizzo http://explorer.msn.it/intl.asp