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

Commit69a751c

Browse files
committed
comments edited slightly
1 parent5e7d5f0 commit69a751c

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

‎src/pl_funcs.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1164,7 +1164,6 @@ update_trigger_func(PG_FUNCTION_ARGS)
11641164
*/
11651165
key_name=get_attname(parent,prel->attnum);
11661166
source_key=get_attnum(source_relid,key_name);
1167-
// target_key = get_attnum(target_relid, key_name);
11681167
key=heap_getattr(new_tuple,source_key,source_tupdesc,&isnull);
11691168

11701169
/* Find partition it should go into */
@@ -1174,18 +1173,18 @@ update_trigger_func(PG_FUNCTION_ARGS)
11741173
if (target_relid==source_relid)
11751174
PG_RETURN_POINTER(new_tuple);
11761175

1177-
/* TODO: probably should be another lock level */
1178-
target_rel=heap_open(target_relid,RowExclusiveLock);
1179-
target_tupdesc=target_rel->rd_att;
1180-
11811176
/* Read tuple id */
11821177
ctid=heap_getsysattr(old_tuple,
11831178
SelfItemPointerAttributeNumber,
11841179
source_tupdesc,
11851180
&isnull);
11861181

1182+
/* Open partition table */
1183+
target_rel=heap_open(target_relid,RowExclusiveLock);
1184+
target_tupdesc=target_rel->rd_att;
1185+
11871186
/*
1188-
*Else if it's a different partitionthen build a TupleConversionMap
1187+
*As it is different partitionwe need to build a TupleConversionMap
11891188
* between original partition and new one. And then do a convertation
11901189
*/
11911190
conversion_map=convert_tuples_by_name(source_tupdesc,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp