Re: Questions on RI spec (poss. bugs) - Mailing list pgsql-hackers

From Jan Wieck
Subject Re: Questions on RI spec (poss. bugs)
Date
Msg-id 200011211732.MAA03431@jupiter.jw.home
Whole thread Raw
In response to Questions on RI spec (poss. bugs)  (Stephan Szabo <sszabo@megazone23.bigpanda.com>)
Responses Re: Questions on RI spec (poss. bugs)
Re: Questions on RI spec (poss. bugs)
List pgsql-hackers
Stephan Szabo wrote:
>
>    There's a message on -general about a possible
> problem in the deferred RI constraints.  He was doing a
> sequence like:
> begin
>  delete
>  insert
> end
> and having it fail even though the deleted key was back in
> place at the end.
   Isn't  that  (delete  and  reinsert  the  same  PK)  what the   standard means with "triggered data change
violation"?
   It is a second touching of a unique matching PK. And in  this   case the standard doesn't define a behaviour,
insteadit says   you cannot do so.
 
   In the case of reinserting a deleted PK, does the new PK  row   inherit the references to the old PK row? If so, an
ONDELETE   CASCADE must be suppressed - no?
 
   If I'm right that it  should  be  a  "triggered  data  change   violation",  the  problem  is  just changing into
onewe have   with delete/reinsert in the ON DELETE CASCADE  case.  Haven't   tested, but the current implementation
shouldn'tdetect it.
 


Jan


--

#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me.                                  #
#================================================== JanWieck@Yahoo.com #




pgsql-hackers by date:

Previous
From: Larry Rosenman
Date:
Subject: Re: quick english patch
Next
From: Peter Eisentraut
Date:
Subject: Re: quick english patch