1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-25 01:02:05 +03:00

Make functions static where possible, enclose unused functions in #ifdef NOT_USED.

This commit is contained in:
Bruce Momjian
1997-08-19 21:40:56 +00:00
parent b992e200b8
commit 1d8bbfd2e7
186 changed files with 1114 additions and 1048 deletions

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/costsize.c,v 1.15 1997/04/24 15:49:30 vadim Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/path/costsize.c,v 1.16 1997/08/19 21:31:48 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -41,6 +41,7 @@ extern int NBuffers;
static int compute_attribute_width(TargetEntry *tlistentry);
static double base_log(double x, double b);
static int compute_targetlist_width(List *targetlist);
int _disable_cost_ = 30000000;
@ -209,6 +210,7 @@ cost_sort(List *keys, int tuples, int width, bool noread)
* Returns a flonum.
*
*/
#ifdef NOT_USED
Cost
cost_result(int tuples, int width)
{
@ -218,6 +220,7 @@ cost_result(int tuples, int width)
Assert(temp >= 0);
return(temp);
}
#endif
/*
* cost_nestloop--
@ -386,7 +389,7 @@ compute_rel_width(Rel *rel)
*
* Returns the width of the tuple as a fixnum.
*/
int
static int
compute_targetlist_width(List *targetlist)
{
List *temp_tl;

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/clauses.c,v 1.6 1997/01/22 06:30:57 vadim Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/clauses.c,v 1.7 1997/08/19 21:31:54 momjian Exp $
*
* HISTORY
* AUTHOR DATE MAJOR EVENT
@ -34,6 +34,8 @@
#include "optimizer/internal.h"
#include "optimizer/var.h"
static bool agg_clause(Node *clause);
Expr *
make_clause(int type, Node *oper, List *args)
@ -134,7 +136,7 @@ get_rightop(Expr *clause)
* AGG clause functions
*****************************************************************************/
bool
static bool
agg_clause(Node *clause)
{
return

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/keys.c,v 1.1.1.1 1996/07/09 06:21:38 scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/keys.c,v 1.2 1997/08/19 21:32:03 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -23,6 +23,7 @@
static Expr *matching2_tlvar(int var, List *tlist, bool (*test)());
static bool equal_indexkey_var(int index_key, Var *var);
/*
* 1. index key
@ -69,7 +70,7 @@ match_indexkey_operand(int indexkey, Var *operand, Rel *rel)
* fields of var node 'var'.
*
*/
bool
static bool
equal_indexkey_var(int index_key, Var *var)
{
if (index_key == var->varattno)

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/ordering.c,v 1.2 1996/10/31 10:59:41 scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/ordering.c,v 1.3 1997/08/19 21:32:06 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -18,6 +18,7 @@
#include "optimizer/internal.h"
#include "optimizer/ordering.h"
static bool equal_sortops_order(Oid *ordering1, Oid *ordering2);
/*
* equal-path-path-ordering--
@ -102,7 +103,7 @@ equal_merge_merge_ordering(MergeOrder *merge_ordering1,
* equal_sort_ops_order -
* Returns true iff the sort operators are in the same order.
*/
bool
static bool
equal_sortops_order(Oid *ordering1, Oid *ordering2)
{
int i = 0;

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/tlist.c,v 1.2 1997/04/05 06:39:58 vadim Exp $
* $Header: /cvsroot/pgsql/src/backend/optimizer/util/tlist.c,v 1.3 1997/08/19 21:32:08 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -532,10 +532,10 @@ get_expr(TargetEntry *tle)
* append the group attribute to the target list if it's not already
* in there.
*/
#if 0
void
AddGroupAttrToTlist(List *tlist, List *grpCl)
{
#if 0
List *gl;
int last_resdomno = length(tlist) + 1;
@ -557,8 +557,8 @@ AddGroupAttrToTlist(List *tlist, List *grpCl)
tlist = lappend(tlist, MakeTLE(r, (Node*)var));
}
}
#endif
}
#endif
/* was ExecTargetListLength() in execQual.c,
moved here to reduce dependencies on the executor module */