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

Commitf6cd9d5

Browse files
committed
remove useless includes, remove PathmanRange & PathmanHash impl
1 parent11be0fe commitf6cd9d5

File tree

4 files changed

+9
-77
lines changed

4 files changed

+9
-77
lines changed

‎src/hooks.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010

1111
#include"hooks.h"
1212
#include"init.h"
13+
#include"partition_filter.h"
1314
#include"runtimeappend.h"
1415
#include"runtime_merge_append.h"
15-
#include"partition_filter.h"
1616
#include"utils.h"
1717

1818
#include"miscadmin.h"
@@ -447,13 +447,10 @@ pathman_planner_hook(Query *parse, int cursorOptions, ParamListInfo boundParams)
447447
void
448448
pathman_post_parse_analysis_hook(ParseState*pstate,Query*query)
449449
{
450-
elog(DEBUG2,"Called parse hook [%u]",MyProcPid);
451-
452450
/* Invoke original hook if needed */
453451
if (post_parse_analyze_hook_next)
454452
post_parse_analyze_hook_next(pstate,query);
455453

456-
457454
/* Finish delayed invalidation jobs */
458455
if (IsPathmanReady())
459456
finish_delayed_invalidation();

‎src/init.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,18 +25,17 @@
2525
#include"catalog/pg_inherits.h"
2626
#include"catalog/pg_inherits_fn.h"
2727
#include"catalog/pg_type.h"
28-
#include"executor/spi.h"
2928
#include"miscadmin.h"
3029
#include"optimizer/clauses.h"
3130
#include"utils/datum.h"
3231
#include"utils/inval.h"
33-
#include"utils/fmgroids.h"
34-
#include"utils/syscache.h"
3532
#include"utils/builtins.h"
36-
#include"utils/typcache.h"
33+
#include"utils/fmgroids.h"
3734
#include"utils/memutils.h"
3835
#include"utils/lsyscache.h"
3936
#include"utils/snapmgr.h"
37+
#include"utils/syscache.h"
38+
#include"utils/typcache.h"
4039

4140

4241
/* Help user in case of emergency */

‎src/pathman.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,6 @@
5151
/* type modifier (typmod) for 'range_interval' */
5252
#definePATHMAN_CONFIG_interval_typmod-1
5353

54-
#definePATHMAN_CONFIG_ID_SEQ"pathman_config_id_seq"
55-
5654
/*
5755
* Definitions for the "pathman_config_params" table
5856
*/

‎src/pl_funcs.c

Lines changed: 5 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
* ------------------------------------------------------------------------
99
*/
1010

11-
#include"pathman.h"
1211
#include"init.h"
13-
#include"utils.h"
12+
#include"pathman.h"
1413
#include"relation_info.h"
14+
#include"utils.h"
1515
#include"xact_handling.h"
1616

1717
#include"access/htup_details.h"
@@ -20,13 +20,13 @@
2020
#include"catalog/indexing.h"
2121
#include"commands/sequence.h"
2222
#include"miscadmin.h"
23+
#include"utils/array.h"
2324
#include"utils/builtins.h"
25+
#include<utils/inval.h>
26+
#include"utils/memutils.h"
2427
#include"utils/lsyscache.h"
2528
#include"utils/syscache.h"
2629
#include"utils/typcache.h"
27-
#include"utils/array.h"
28-
#include"utils/memutils.h"
29-
#include<utils/inval.h>
3030

3131

3232
/* declarations */
@@ -56,33 +56,6 @@ PG_FUNCTION_INFO_V1( lock_partitioned_relation );
5656
PG_FUNCTION_INFO_V1(debug_capture );
5757

5858

59-
/* pathman_range type */
60-
typedefstructPathmanRange
61-
{
62-
Oidtype_oid;
63-
boolby_val;
64-
RangeEntryrange;
65-
}PathmanRange;
66-
67-
typedefstructPathmanHash
68-
{
69-
Oidchild_oid;
70-
uint32hash;
71-
}PathmanHash;
72-
73-
typedefstructPathmanRangeListCtxt
74-
{
75-
Oidtype_oid;
76-
boolby_val;
77-
RangeEntry*ranges;
78-
intnranges;
79-
intpos;
80-
}PathmanRangeListCtxt;
81-
82-
PG_FUNCTION_INFO_V1(pathman_range_in );
83-
PG_FUNCTION_INFO_V1(pathman_range_out );
84-
85-
8659
staticvoidon_partitions_created_internal(Oidpartitioned_table,booladd_callbacks);
8760
staticvoidon_partitions_updated_internal(Oidpartitioned_table,booladd_callbacks);
8861
staticvoidon_partitions_removed_internal(Oidpartitioned_table,booladd_callbacks);
@@ -729,41 +702,6 @@ lock_partitioned_relation(PG_FUNCTION_ARGS)
729702
}
730703

731704

732-
Datum
733-
pathman_range_in(PG_FUNCTION_ARGS)
734-
{
735-
elog(ERROR,"Not implemented");
736-
}
737-
738-
Datum
739-
pathman_range_out(PG_FUNCTION_ARGS)
740-
{
741-
PathmanRange*rng= (PathmanRange*)PG_GETARG_POINTER(0);
742-
char*result;
743-
char*left,
744-
*right;
745-
Oidoutputfunc;
746-
booltypisvarlena;
747-
748-
getTypeOutputInfo(rng->type_oid,&outputfunc,&typisvarlena);
749-
750-
left=OidOutputFunctionCall(
751-
outputfunc,
752-
rng->by_val ?
753-
(Datum)rng->range.min :
754-
PointerGetDatum(&rng->range.min));
755-
756-
right=OidOutputFunctionCall(
757-
outputfunc,
758-
rng->by_val ?
759-
(Datum)rng->range.max :
760-
PointerGetDatum(&rng->range.max));
761-
762-
result=psprintf("[%s: %s)",left,right);
763-
PG_RETURN_CSTRING(result);
764-
}
765-
766-
767705
/*
768706
* NOTE: used for DEBUG, set breakpoint here.
769707
*/

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp