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

Commit89dcaef

Browse files
committed
use find_inheritance_children_array() in add_to_pathman_config()
1 parent5d43c57 commit89dcaef

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

‎src/init.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -418,8 +418,6 @@ find_inheritance_children_array(Oid parentrelId,
418418

419419
uint32i;
420420

421-
Assert(lockmode!=NoLock);
422-
423421
/* Init safe return values */
424422
*children_size=0;
425423
*children=NULL;

‎src/pl_funcs.c

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -708,6 +708,9 @@ add_to_pathman_config(PG_FUNCTION_ARGS)
708708
char*expression;
709709
PartTypeparttype;
710710

711+
Oid*children;
712+
uint32children_count;
713+
711714
Relationpathman_config;
712715
Datumvalues[Natts_pathman_config];
713716
boolisnull[Natts_pathman_config];
@@ -823,8 +826,12 @@ add_to_pathman_config(PG_FUNCTION_ARGS)
823826
heap_close(pathman_config,RowExclusiveLock);
824827

825828
/* Update caches only if this relation has children */
826-
if (has_subclass(relid))
829+
if (FCS_FOUND==find_inheritance_children_array(relid,NoLock, true,
830+
&children_count,
831+
&children))
827832
{
833+
pfree(children);
834+
828835
/* Now try to create a PartRelationInfo */
829836
PG_TRY();
830837
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp