FK on update no action patch

Started by Stephan Szaboover 23 years ago3 messagespatches
Jump to latest
#1Stephan Szabo
sszabo@megazone23.bigpanda.com

During looking stuff up for a discussion on -general, I realized that I'd
placed the check for newly created matching pk rows for on update no
action earlier than it needed to be so that it'd check even when the key
values hadn't changed. This patch moves it to after checking for NULLs in
the old row and comparing the values since the select's probably more
expensive.

Regression tests appear to pass as do simple tests.

Attachments:

newpatch.txttext/plain; name=newpatch.txtDownload+12-11
#2Bruce Momjian
bruce@momjian.us
In reply to: Stephan Szabo (#1)
Re: FK on update no action patch

Your patch has been added to the PostgreSQL unapplied patches list at:

http://momjian.postgresql.org/cgi-bin/pgpatches

I will try to apply it within the next 48 hours.

---------------------------------------------------------------------------

Stephan Szabo wrote:

During looking stuff up for a discussion on -general, I realized that I'd
placed the check for newly created matching pk rows for on update no
action earlier than it needed to be so that it'd check even when the key
values hadn't changed. This patch moves it to after checking for NULLs in
the old row and comparing the values since the select's probably more
expensive.

Regression tests appear to pass as do simple tests.

Content-Description:

[ Attachment, skipping... ]

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073
#3Bruce Momjian
bruce@momjian.us
In reply to: Stephan Szabo (#1)
Re: FK on update no action patch

Patch applied. Thanks.

---------------------------------------------------------------------------

Stephan Szabo wrote:

During looking stuff up for a discussion on -general, I realized that I'd
placed the check for newly created matching pk rows for on update no
action earlier than it needed to be so that it'd check even when the key
values hadn't changed. This patch moves it to after checking for NULLs in
the old row and comparing the values since the select's probably more
expensive.

Regression tests appear to pass as do simple tests.

Content-Description:

[ Attachment, skipping... ]

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to majordomo@postgresql.org)

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073