From: | Jan Wieck <JanWieck(at)Yahoo(dot)com> |
---|---|
To: | Michael Paesold <mpaesold(at)gmx(dot)at> |
Cc: | Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>, Tatsuo Ishii <t-ishii(at)sra(dot)co(dot)jp>, chriskl(at)familyhealth(dot)com(dot)au, pgsql-hackers(at)postgresql(dot)org |
Subject: | Re: Backpatch FK changes to 7.3 and 7.2? |
Date: | 2003-04-12 21:27:32 |
Message-ID: | 3E9884C4.E9175B11@Yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-general pgsql-hackers |
Michael Paesold wrote:
>
> Jan Wieck wrote:
> > > In any case, why don't we get a patch against 7.3, and make an
> > > announcement and let people who are interested use it and test it. With
> > > in-field testing it'd probably be safe enough. :)
> >
> > Here it is.
> >
>
> [patch... skipping]
>
> I applied the patch to a 7.3.2 installation, and did a make clean, make,
> make check. There is one regression error. Is this an expected behaviour? Or
> did I do something wrong? See regression diffs:
This is expected. The RI violation in the case of deleting a referenced
PK row that actually is the defaults values of the FK table is now
detected differently. Hence the change in the error message text.
Jan
>
> *** ./expected/foreign_key.out Sun Sep 22 02:37:09 2002
> --- ./results/foreign_key.out Sat Apr 12 20:44:54 2003
> ***************
> *** 882,888 ****
> ERROR: $1 referential integrity violation - key in pktable still
> referenced from pktable
> -- fails (1,1) is being referenced (twice)
> update pktable set base1=3 where base1=1;
> ! ERROR: $1 referential integrity violation - key referenced from pktable
> not found in pktable
> -- this sequence of two deletes will work, since after the first there
> will be no (2,*) references
> delete from pktable where base2=2;
> delete from pktable where base1=2;
> --- 882,888 ----
> ERROR: $1 referential integrity violation - key in pktable still
> referenced from pktable
> -- fails (1,1) is being referenced (twice)
> update pktable set base1=3 where base1=1;
> ! ERROR: $1 referential integrity violation - key in pktable still
> referenced from pktable
> -- this sequence of two deletes will work, since after the first there
> will be no (2,*) references
> delete from pktable where base2=2;
> delete from pktable where base1=2;
>
> Best Regards,
> Michael Paesold
--
#======================================================================#
# It's easier to get forgiveness for being wrong than for being right. #
# Let's break this rule - forgive me. #
#================================================== JanWieck(at)Yahoo(dot)com #
From | Date | Subject | |
---|---|---|---|
Next Message | Bruno Wolff III | 2003-04-12 22:47:01 | Re: Case sensitive order by |
Previous Message | Steven Singer | 2003-04-12 20:06:34 | Re: Batch replication ordering (was Re: [GENERAL] 32/64-bit |
From | Date | Subject | |
---|---|---|---|
Next Message | Mark Kirkwood | 2003-04-12 22:45:30 | Re: Anyone working on better transaction locking? |
Previous Message | Michael Paesold | 2003-04-12 20:08:40 | Re: Anyone working on better transaction locking? |