mirror of
https://github.com/postgres/postgres.git
synced 2025-07-18 17:42:25 +03:00
During ALTER TABLE ADD FOREIGN KEY, try to check the existing rows using
a single LEFT JOIN query instead of firing the check trigger for each row individually. Stephan Szabo, with some kibitzing from Tom Lane and Jan Wieck.
This commit is contained in:
@ -6,7 +6,7 @@
|
||||
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: trigger.h,v 1.43 2003/08/04 02:40:13 momjian Exp $
|
||||
* $Id: trigger.h,v 1.44 2003/10/06 16:38:28 tgl Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -197,5 +197,8 @@ extern void DeferredTriggerSetState(ConstraintsSetStmt *stmt);
|
||||
* in utils/adt/ri_triggers.c
|
||||
*/
|
||||
extern bool RI_FKey_keyequal_upd(TriggerData *trigdata);
|
||||
extern bool RI_Initial_Check(FkConstraint *fkconstraint,
|
||||
Relation rel,
|
||||
Relation pkrel);
|
||||
|
||||
#endif /* TRIGGER_H */
|
||||
|
Reference in New Issue
Block a user