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

Commitc9f26d7

Browse files
committed
COPY should handle after-insert triggers the same as execMain.c does.
I'm not sure that it's really necessary to save insert events when thereare only after update or delete triggers, but certainly it's wrong forCOPY to behave differently from an INSERT query.
1 parent609fee4 commitc9f26d7

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

‎src/backend/commands/copy.c‎

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.133 2001/01/29 00:39:20 tgl Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.134 2001/03/14 21:47:50 tgl Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -877,12 +877,12 @@ CopyFrom(Relation rel, bool binary, bool oids, FILE *fp,
877877

878878
if (!skip_tuple)
879879
{
880+
ExecStoreTuple(tuple,slot,InvalidBuffer, false);
881+
880882
/* ----------------
881883
* Check the constraints of the tuple
882884
* ----------------
883885
*/
884-
ExecStoreTuple(tuple,slot,InvalidBuffer, false);
885-
886886
if (rel->rd_att->constr)
887887
ExecConstraints("CopyFrom",resultRelInfo,slot,estate);
888888

@@ -896,8 +896,7 @@ CopyFrom(Relation rel, bool binary, bool oids, FILE *fp,
896896
ExecInsertIndexTuples(slot,&(tuple->t_self),estate, false);
897897

898898
/* AFTER ROW INSERT Triggers */
899-
if (rel->trigdesc&&
900-
rel->trigdesc->n_after_row[TRIGGER_EVENT_INSERT]>0)
899+
if (rel->trigdesc)
901900
ExecARInsertTriggers(estate,rel,tuple);
902901
}
903902

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp