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

Commit12a34f5

Browse files
committed
Improve ExecModifyTable comments.
Some of these comments wrongly implied that only an AFTER ROW triggerwill cause a 'wholerow' attribute to be present for a foreign table,but a BEFORE ROW trigger can have the same effect. Others impliedthat it would always be present for a foreign table, but that's nottrue either.Etsuro Fujita and Robert HaasDiscussion:http://postgr.es/m/10026bc7-1403-ef85-9e43-c6100c1cc0e3@lab.ntt.co.jp
1 parent610e8eb commit12a34f5

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

‎src/backend/executor/nodeModifyTable.c

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1696,7 +1696,7 @@ ExecModifyTable(PlanState *pstate)
16961696
* the old relation tuple.
16971697
*
16981698
* Foreign table updates have a wholerow attribute when the
1699-
* relation hasan AFTER ROW trigger. Note that the wholerow
1699+
* relation hasa row-level trigger. Note that the wholerow
17001700
* attribute does not carry system columns. Foreign table
17011701
* triggers miss seeing those, except that we know enough here
17021702
* to set t_tableOid. Quite separately from this, the FDW may
@@ -2182,8 +2182,11 @@ ExecInitModifyTable(ModifyTable *node, EState *estate, int eflags)
21822182
/*
21832183
* Initialize the junk filter(s) if needed. INSERT queries need a filter
21842184
* if there are any junk attrs in the tlist. UPDATE and DELETE always
2185-
* need a filter, since there's always a junk 'ctid' or 'wholerow'
2186-
* attribute present --- no need to look first.
2185+
* need a filter, since there's always at least one junk attribute present
2186+
* --- no need to look first. Typically, this will be a 'ctid' or
2187+
* 'wholerow' attribute, but in the case of a foreign data wrapper it
2188+
* might be a set of junk attributes sufficient to identify the remote
2189+
* row.
21872190
*
21882191
* If there are multiple result relations, each one needs its own junk
21892192
* filter. Note multiple rels are only possible for UPDATE/DELETE, so we
@@ -2251,7 +2254,7 @@ ExecInitModifyTable(ModifyTable *node, EState *estate, int eflags)
22512254
elseif (relkind==RELKIND_FOREIGN_TABLE)
22522255
{
22532256
/*
2254-
* When there isan AFTER trigger, there should be a
2257+
* When there isa row-level trigger, there should be a
22552258
* wholerow attribute.
22562259
*/
22572260
j->jf_junkAttNo=ExecFindJunkAttribute(j,"wholerow");

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp