Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd8e70cd

Browse files
committed
Fix for trigger handling:
* We should not even consider checking the row if it is no longer * valid since it was either deleted (doesn't matter) or updated * (in which case it'll be checked with its final values).Stephan Szabo
1 parenteb1fb86 commitd8e70cd

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

‎src/backend/utils/adt/ri_triggers.c

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
* Portions Copyright (c) 2000-2001, PostgreSQL Global Development Group
1919
* Copyright 1999 Jan Wieck
2020
*
21-
* $Header: /cvsroot/pgsql/src/backend/utils/adt/ri_triggers.c,v 1.32 2002/03/06 06:10:14 momjian Exp $
21+
* $Header: /cvsroot/pgsql/src/backend/utils/adt/ri_triggers.c,v 1.33 2002/03/19 02:57:15 momjian Exp $
2222
*
2323
* ----------
2424
*/
@@ -208,6 +208,17 @@ RI_FKey_check(PG_FUNCTION_ARGS)
208208
new_row=trigdata->tg_trigtuple;
209209
}
210210

211+
/*
212+
* We should not even consider checking the row if it is no longer
213+
* valid since it was either deleted (doesn't matter) or updated
214+
* (in which case it'll be checked with its final values).
215+
*/
216+
if (new_row) {
217+
if (!HeapTupleSatisfiesItself(new_row->t_data)) {
218+
returnPointerGetDatum(NULL);
219+
}
220+
}
221+
211222
/* ----------
212223
* SQL3 11.9 <referential constraint definition>
213224
*Gereral rules 2) a):

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp