mirror of
https://github.com/postgres/postgres.git
synced 2025-11-09 06:21:09 +03:00
Make functions static where possible, enclose unused functions in #ifdef NOT_USED.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.33 1997/08/18 20:53:00 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.34 1997/08/19 21:32:11 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -87,6 +87,7 @@ static void make_arguments(int nargs, List *fargs, Oid *input_typeids,
|
||||
static void AddAggToParseState(ParseState *pstate, Aggreg *aggreg);
|
||||
static void finalizeAggregates(ParseState *pstate, Query *qry);
|
||||
static void parseCheckAggregates(ParseState *pstate, Query *qry);
|
||||
static ParseState* makeParseState(void);
|
||||
|
||||
/*****************************************************************************
|
||||
*
|
||||
@@ -99,7 +100,7 @@ static void parseCheckAggregates(ParseState *pstate, Query *qry);
|
||||
*
|
||||
*/
|
||||
|
||||
ParseState*
|
||||
static ParseState*
|
||||
makeParseState(void)
|
||||
{
|
||||
ParseState *pstate;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/catalog_utils.c,v 1.20 1997/08/12 20:15:32 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/catalog_utils.c,v 1.21 1997/08/19 21:32:12 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -109,6 +109,9 @@ typedef struct _CandidateList {
|
||||
static Oid **argtype_inherit(int nargs, Oid *oid_array);
|
||||
static Oid **genxprod(InhPaths *arginh, int nargs);
|
||||
static int findsupers(Oid relid, Oid **supervec);
|
||||
static bool check_typeid(Oid id);
|
||||
static char *instr1(TypeTupleForm tp, char *string, int typlen);
|
||||
static void op_error(char *op, Oid arg1, Oid arg2);
|
||||
|
||||
/* check to see if a type id is valid,
|
||||
* returns true if it is. By using this call before calling
|
||||
@@ -116,7 +119,7 @@ static int findsupers(Oid relid, Oid **supervec);
|
||||
* can be produced because the caller typically has more context of
|
||||
* what's going on - jolly
|
||||
*/
|
||||
bool
|
||||
static bool
|
||||
check_typeid(Oid id)
|
||||
{
|
||||
return (SearchSysCacheTuple(TYPOID,
|
||||
@@ -784,6 +787,7 @@ getAttrName(Relation rd, int attrno)
|
||||
|
||||
/* Given a typename and value, returns the ascii form of the value */
|
||||
|
||||
#ifdef NOT_USED
|
||||
char *
|
||||
outstr(char *typename, /* Name of type of value */
|
||||
char *value) /* Could be of any type */
|
||||
@@ -795,6 +799,7 @@ outstr(char *typename, /* Name of type of value */
|
||||
op = tp->typoutput;
|
||||
return((char *) fmgr(op, value));
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Given a Type and a string, return the internal form of that string */
|
||||
char *
|
||||
@@ -805,7 +810,7 @@ instr2(Type tp, char *string, int typlen)
|
||||
|
||||
/* Given a type structure and a string, returns the internal form of
|
||||
that string */
|
||||
char *
|
||||
static char *
|
||||
instr1(TypeTupleForm tp, char *string, int typlen)
|
||||
{
|
||||
Oid op;
|
||||
@@ -1422,6 +1427,7 @@ get_typelem(Oid type_id)
|
||||
return (type->typelem);
|
||||
}
|
||||
|
||||
#ifdef NOT_USED
|
||||
char
|
||||
FindDelimiter(char *typename)
|
||||
{
|
||||
@@ -1440,12 +1446,13 @@ FindDelimiter(char *typename)
|
||||
delim = type->typdelim;
|
||||
return (delim);
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Give a somewhat useful error message when the operator for two types
|
||||
* is not found.
|
||||
*/
|
||||
void
|
||||
static void
|
||||
op_error(char *op, Oid arg1, Oid arg2)
|
||||
{
|
||||
Type tp1 = NULL, tp2 = NULL;
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/dbcommands.c,v 1.5 1997/08/18 20:53:03 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/dbcommands.c,v 1.6 1997/08/19 21:32:14 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -38,6 +38,7 @@
|
||||
static void check_permissions(char *command, char *dbname,
|
||||
Oid *dbIdP, Oid *userIdP);
|
||||
static HeapTuple get_pg_dbtup(char *command, char *dbname, Relation dbrel);
|
||||
static void stop_vacuum(char *dbname);
|
||||
|
||||
void
|
||||
createdb(char *dbname)
|
||||
@@ -241,7 +242,7 @@ check_permissions(char *command,
|
||||
* stop_vacuum() -- stop the vacuum daemon on the database, if one is
|
||||
* running.
|
||||
*/
|
||||
void
|
||||
static void
|
||||
stop_vacuum(char *dbname)
|
||||
{
|
||||
char filename[256];
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/parse_query.c,v 1.16 1997/05/31 07:10:25 vadim Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/parser/Attic/parse_query.c,v 1.17 1997/08/19 21:32:16 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -38,6 +38,9 @@
|
||||
#include "nodes/parsenodes.h"
|
||||
#include "nodes/makefuncs.h"
|
||||
|
||||
static void checkTargetTypes(ParseState *pstate, char *target_colname,
|
||||
char *refname, char *colname);
|
||||
|
||||
Oid *param_type_info;
|
||||
int pfunc_num_args;
|
||||
|
||||
@@ -755,7 +758,7 @@ handleTargetColname(ParseState *pstate, char **resname,
|
||||
* checkTargetTypes -
|
||||
* checks value and target column types
|
||||
*/
|
||||
void
|
||||
static void
|
||||
checkTargetTypes(ParseState *pstate, char *target_colname,
|
||||
char *refname, char *colname)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user