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

Commit0c38735

Browse files
committed
minor style fixes & refactoring
1 parent44a3f67 commit0c38735

File tree

6 files changed

+36
-24
lines changed

6 files changed

+36
-24
lines changed

‎src/include/compat/pg_compat.h

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,7 @@ extern AttrNumber *convert_tuples_by_name_map(TupleDesc indesc,
788788
#endif
789789

790790
/*
791-
* compute_parallel_worker
791+
* compute_parallel_worker()
792792
*/
793793
#ifPG_VERSION_NUM >=110000
794794
#definecompute_parallel_worker_compat(rel,heap_pages,index_pages) \
@@ -801,7 +801,7 @@ extern AttrNumber *convert_tuples_by_name_map(TupleDesc indesc,
801801

802802

803803
/*
804-
* generate_gather_paths
804+
* generate_gather_paths()
805805
*/
806806
#ifPG_VERSION_NUM >=110000
807807
#definegenerate_gather_paths_compat(root,rel) \
@@ -815,7 +815,7 @@ extern AttrNumber *convert_tuples_by_name_map(TupleDesc indesc,
815815

816816

817817
/*
818-
*handling appendrelinfo array
818+
*find_childrel_appendrelinfo()
819819
*/
820820
#ifPG_VERSION_NUM >=110000
821821
#definefind_childrel_appendrelinfo_compat(root,rel) \
@@ -832,6 +832,29 @@ extern AttrNumber *convert_tuples_by_name_map(TupleDesc indesc,
832832
* -------------
833833
*/
834834

835+
/* See ExecEvalParamExtern() */
836+
staticinlineParamExternData*
837+
CustomEvalParamExternCompat(Param*param,ParamListInfoparams)
838+
{
839+
ParamExternData*prm;
840+
841+
#ifPG_VERSION_NUM >=110000
842+
ParamExternDataprmdata;
843+
844+
if (params->paramFetch!=NULL)
845+
prm=params->paramFetch(params,param->paramid, false,&prmdata);
846+
else
847+
prm=&params->params[param->paramid-1];
848+
#else
849+
prm=&params->params[param->paramid-1];
850+
851+
if (!OidIsValid(prm->ptype)&&params->paramFetch!=NULL)
852+
params->paramFetch(params,param->paramid);
853+
#endif
854+
855+
returnprm;
856+
}
857+
835858
voidset_append_rel_size_compat(PlannerInfo*root,RelOptInfo*rel,Indexrti);
836859

837860

‎src/include/partition_filter.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@
2929

3030

3131
#defineERR_PART_ATTR_NULL"partitioning expression's value should not be NULL"
32-
#defineERR_PART_ATTR_MULTIPLE_RESULTS
3332
#defineERR_PART_ATTR_NO_PART"no suitable partition for key '%s'"
3433
#defineERR_PART_ATTR_MULTIPLEINSERT_NODE_NAME " selected more than one partition"
3534
#defineERR_PART_DESC_CONVERT"could not convert row type for partition"

‎src/init.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636
#include"utils/snapmgr.h"
3737
#include"utils/syscache.h"
3838
#include"utils/typcache.h"
39+
3940
#ifPG_VERSION_NUM<110000
4041
#include"catalog/pg_inherits_fn.h"
4142
#endif

‎src/pl_funcs.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@
2323
#include"catalog/dependency.h"
2424
#include"catalog/indexing.h"
2525
#include"catalog/namespace.h"
26-
#ifPG_VERSION_NUM<110000
27-
#include"catalog/pg_inherits_fn.h"
28-
#endif
2926
#include"catalog/pg_type.h"
3027
#include"commands/tablespace.h"
3128
#include"commands/trigger.h"
@@ -41,6 +38,10 @@
4138
#include"utils/syscache.h"
4239
#include"utils/typcache.h"
4340

41+
#ifPG_VERSION_NUM<110000
42+
#include"catalog/pg_inherits_fn.h"
43+
#endif
44+
4445

4546
/* Function declarations */
4647

‎src/pl_range_funcs.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,6 @@
1818
#include"access/xact.h"
1919
#include"catalog/heap.h"
2020
#include"catalog/namespace.h"
21-
#ifPG_VERSION_NUM<110000
22-
#include"catalog/pg_inherits_fn.h"
23-
#endif
2421
#include"catalog/pg_type.h"
2522
#include"commands/tablecmds.h"
2623
#include"executor/spi.h"
@@ -35,6 +32,10 @@
3532
#include"utils/syscache.h"
3633
#include"utils/snapmgr.h"
3734

35+
#ifPG_VERSION_NUM<110000
36+
#include"catalog/pg_inherits_fn.h"
37+
#endif
38+
3839
#ifPG_VERSION_NUM >=100000
3940
#include"utils/regproc.h"
4041
#include"utils/varlena.h"

‎src/planner_tree_modification.c

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -851,20 +851,7 @@ eval_extern_params_mutator(Node *node, ParamListInfo params)
851851
param->paramid>0&&
852852
param->paramid <=params->numParams)
853853
{
854-
ParamExternData*prm;
855-
856-
#ifPG_VERSION_NUM >=110000
857-
ParamExternDataprmdata;
858-
if (params->paramFetch!=NULL)
859-
prm=params->paramFetch(params,param->paramid, false,&prmdata);
860-
else
861-
prm=&params->params[param->paramid-1];
862-
#else
863-
prm=&params->params[param->paramid-1];
864-
if (!OidIsValid(prm->ptype)&&params->paramFetch!=NULL)
865-
(*params->paramFetch) (params,param->paramid);
866-
#endif
867-
854+
ParamExternData*prm=CustomEvalParamExternCompat(param,params);
868855

869856
if (OidIsValid(prm->ptype))
870857
{

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp