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

Commitf19a764

Browse files
committed
remove useless and obsolete functions, fix format string in pathman_workers.c
1 parent1d8c48b commitf19a764

File tree

3 files changed

+1
-90
lines changed

3 files changed

+1
-90
lines changed

‎src/pathman_workers.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -540,7 +540,7 @@ bgw_main_concurrent_part(Datum main_arg)
540540
part_slot->total_rows+=rows;
541541
/* Report debug message */
542542
#ifdefUSE_ASSERT_CHECKING
543-
elog(DEBUG1,"%s: relocated %d rows, total:%lu [%u]",
543+
elog(DEBUG1,"%s: relocated %d rows, total:"UINT64_FORMAT" [%u]",
544544
concurrent_part_bgw,rows,part_slot->total_rows,MyProcPid);
545545
#endif
546546
SpinLockRelease(&part_slot->mutex);

‎src/utils.c

Lines changed: 0 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -176,65 +176,6 @@ bms_print(Bitmapset *bms)
176176
returnstr.data;
177177
}
178178

179-
/*
180-
* Copied from util/plancat.c
181-
*
182-
* Build a targetlist representing the columns of the specified index.
183-
*/
184-
List*
185-
build_index_tlist(PlannerInfo*root,IndexOptInfo*index,
186-
RelationheapRelation)
187-
{
188-
List*tlist=NIL;
189-
Indexvarno=index->rel->relid;
190-
ListCell*indexpr_item;
191-
inti;
192-
193-
indexpr_item=list_head(index->indexprs);
194-
for (i=0;i<index->ncolumns;i++)
195-
{
196-
intindexkey=index->indexkeys[i];
197-
Expr*indexvar;
198-
199-
if (indexkey!=0)
200-
{
201-
/* simple column */
202-
Form_pg_attributeatt_tup;
203-
204-
if (indexkey<0)
205-
att_tup=SystemAttributeDefinition(indexkey,
206-
heapRelation->rd_rel->relhasoids);
207-
else
208-
att_tup=heapRelation->rd_att->attrs[indexkey-1];
209-
210-
indexvar= (Expr*)makeVar(varno,
211-
indexkey,
212-
att_tup->atttypid,
213-
att_tup->atttypmod,
214-
att_tup->attcollation,
215-
0);
216-
}
217-
else
218-
{
219-
/* expression column */
220-
if (indexpr_item==NULL)
221-
elog(ERROR,"wrong number of index expressions");
222-
indexvar= (Expr*)lfirst(indexpr_item);
223-
indexpr_item=lnext(indexpr_item);
224-
}
225-
226-
tlist=lappend(tlist,
227-
makeTargetEntry(indexvar,
228-
i+1,
229-
NULL,
230-
false));
231-
}
232-
if (indexpr_item!=NULL)
233-
elog(ERROR,"wrong number of index expressions");
234-
235-
returntlist;
236-
}
237-
238179
/*
239180
* Get BTORDER_PROC for two types described by Oids
240181
*/
@@ -583,16 +524,6 @@ is_date_type_internal(Oid typid)
583524
typid==DATEOID;
584525
}
585526

586-
/*
587-
* Check if this is a string type.
588-
*/
589-
bool
590-
is_string_type_internal(Oidtypid)
591-
{
592-
returntypid==TEXTOID||
593-
typid==CSTRINGOID;
594-
}
595-
596527

597528
/*
598529
* Try to find binary operator.
@@ -652,20 +583,6 @@ get_rel_name_or_relid(Oid relid)
652583
returnrelname;
653584
}
654585

655-
/*
656-
* Try to get opname or at least opid as cstring.
657-
*/
658-
char*
659-
get_op_name_or_opid(Oidopid)
660-
{
661-
char*opname=get_opname(opid);
662-
663-
if (!opname)
664-
returnDatumGetCString(DirectFunctionCall1(oidout,
665-
ObjectIdGetDatum(opid)));
666-
returnopname;
667-
}
668-
669586

670587
#ifPG_VERSION_NUM<90600
671588
/*

‎src/utils.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,6 @@ typedef struct
3232
voidplan_tree_walker(Plan*plan,
3333
void (*visitor) (Plan*plan,void*context),
3434
void*context);
35-
List*build_index_tlist(PlannerInfo*root,
36-
IndexOptInfo*index,
37-
RelationheapRelation);
3835
voidchange_varnos(Node*node,Oidold_varno,Oidnew_varno);
3936

4037
/*
@@ -48,7 +45,6 @@ void postprocess_lock_rows(List *rtable, Plan *plan);
4845
*/
4946
boolclause_contains_params(Node*clause);
5047
boolis_date_type_internal(Oidtypid);
51-
boolis_string_type_internal(Oidtypid);
5248
boolvalidate_on_part_init_cb(Oidprocid,boolemit_error);
5349
boolcheck_security_policy_internal(Oidrelid,Oidrole);
5450

@@ -67,8 +63,6 @@ Oid get_rel_owner(Oid relid);
6763
* Handy execution-stage functions.
6864
*/
6965
char*get_rel_name_or_relid(Oidrelid);
70-
char*get_op_name_or_opid(Oidopid);
71-
7266
Oidget_binary_operator_oid(char*opname,Oidarg1,Oidarg2);
7367
voidfill_type_cmp_fmgr_info(FmgrInfo*finfo,
7468
Oidtype1,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp