@@ -176,65 +176,6 @@ bms_print(Bitmapset *bms)
176176 return str .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- Relation heapRelation )
187- {
188- List * tlist = NIL ;
189- Index varno = index -> rel -> relid ;
190- ListCell * indexpr_item ;
191- int i ;
192-
193- indexpr_item = list_head (index -> indexprs );
194- for (i = 0 ; i < index -> ncolumns ; i ++ )
195- {
196- int indexkey = index -> indexkeys [i ];
197- Expr * indexvar ;
198-
199- if (indexkey != 0 )
200- {
201- /* simple column */
202- Form_pg_attribute att_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- return tlist ;
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 (Oid typid )
591- {
592- return typid == 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 return relname ;
653584}
654585
655- /*
656- * Try to get opname or at least opid as cstring.
657- */
658- char *
659- get_op_name_or_opid (Oid opid )
660- {
661- char * opname = get_opname (opid );
662-
663- if (!opname )
664- return DatumGetCString (DirectFunctionCall1 (oidout ,
665- ObjectIdGetDatum (opid )));
666- return opname ;
667- }
668-
669586
670587#if PG_VERSION_NUM < 90600
671588/*
0 commit comments