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

Commit4b2382b

Browse files
committed
add more comments, remove completed tasks from README.md
1 parentc61cb62 commit4b2382b

File tree

3 files changed

+14
-9
lines changed

3 files changed

+14
-9
lines changed

‎README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ More interesting features are yet to come. Stay tuned!
3838

3939
##Roadmap
4040

41-
* Provide a way to create user-defined partition creation\destruction callbacks (issue[#22](https://github.com/postgrespro/pg_pathman/issues/22))
4241
* Implement LIST partitioning scheme;
4342
* Optimize hash join (both tables are partitioned by join key).
4443

‎src/pathman.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,12 @@
6666
*/
6767
#definePATHMAN_PARTITION_LIST"pathman_partition_list"
6868
#defineNatts_pathman_partition_list6
69-
#defineAnum_pathman_pl_parent1
70-
#defineAnum_pathman_pl_partition2
71-
#defineAnum_pathman_pl_parttype3
72-
#defineAnum_pathman_pl_partattr4
73-
#defineAnum_pathman_pl_range_min5
74-
#defineAnum_pathman_pl_range_max6
69+
#defineAnum_pathman_pl_parent1/* partitioned relation (regclass) */
70+
#defineAnum_pathman_pl_partition2/* child partition (regclass) */
71+
#defineAnum_pathman_pl_parttype3/* partitioning type (1|2) */
72+
#defineAnum_pathman_pl_partattr4/* partitioned column (text) */
73+
#defineAnum_pathman_pl_range_min5/* partition's min value */
74+
#defineAnum_pathman_pl_range_max6/* partition's max value */
7575

7676

7777
/*

‎src/pl_funcs.c

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,18 @@ PG_FUNCTION_INFO_V1( invoke_on_partition_created_callback );
6262
PG_FUNCTION_INFO_V1(debug_capture );
6363

6464

65+
/*
66+
* User context for function show_partition_list_internal().
67+
*/
6568
typedefstruct
6669
{
6770
Relationpathman_config;
6871
HeapScanDescpathman_config_scan;
6972
Snapshotsnapshot;
7073

71-
constPartRelationInfo*current_prel;
74+
constPartRelationInfo*current_prel;/* selected PartRelationInfo */
7275

73-
uint32child_number;
76+
uint32child_number;/* child we're looking at */
7477
}show_partition_list_cxt;
7578

7679

@@ -348,6 +351,7 @@ show_partition_list_internal(PG_FUNCTION_ARGS)
348351
/* Alias to 'usercxt->current_prel' */
349352
prel=usercxt->current_prel;
350353

354+
/* If we've run out of partitions, switch to the next 'prel' */
351355
if (usercxt->child_number >=PrelChildrenCount(prel))
352356
{
353357
usercxt->current_prel=NULL;
@@ -359,10 +363,12 @@ show_partition_list_internal(PG_FUNCTION_ARGS)
359363
partattr_cstr=get_attname(PrelParentRelid(prel),prel->attnum);
360364
if (!partattr_cstr)
361365
{
366+
/* Parent does not exist, go to the next 'prel' */
362367
usercxt->current_prel=NULL;
363368
continue;
364369
}
365370

371+
/* Fill in common values */
366372
values[Anum_pathman_pl_parent-1]=PrelParentRelid(prel);
367373
values[Anum_pathman_pl_parttype-1]=prel->parttype;
368374
values[Anum_pathman_pl_partattr-1]=CStringGetTextDatum(partattr_cstr);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp