pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Mister ics <mister_ics@hotmail.com>
To: JanWieck@Yahoo.com
Cc: pgsql-sql@postgresql.org
Subject: Re: on update restrict
Date: Wed, 15 Aug 2001 10:16:46
Message-ID: <F91jkO22ZhCl8aii08N00007fba@hotmail.com> (raw)

>
>     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




view thread (5+ messages)  latest in thread

Message-ID: <F91jkO22ZhCl8aii08N00007fba@hotmail.com>
Permalink:  ../F91jkO22ZhCl8aii08N00007fba@hotmail.com/
Also on:    postgresql.org/message-id/F91jkO22ZhCl8aii08N00007fba@hotmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: mister_ics@hotmail.com, JanWieck@Yahoo.com
  Subject: Re: on update restrict
  In-Reply-To: <F91jkO22ZhCl8aii08N00007fba@hotmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox