mirror of
https://github.com/postgres/postgres.git
synced 2025-07-07 00:36:50 +03:00
Used modified version of indent that understands over 100 typedefs.
This commit is contained in:
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.15 1997/09/08 02:22:01 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.16 1997/09/08 21:42:29 momjian Exp $
|
||||
*
|
||||
* NOTES
|
||||
* The PortalExecutorHeapMemory crap needs to be eliminated
|
||||
@ -255,7 +255,7 @@ void
|
||||
PerformAddAttribute(char *relationName,
|
||||
char *userName,
|
||||
bool inherits,
|
||||
ColumnDef * colDef)
|
||||
ColumnDef *colDef)
|
||||
{
|
||||
Relation relrdesc,
|
||||
attrdesc;
|
||||
|
@ -6,7 +6,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.32 1997/09/08 20:55:19 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.33 1997/09/08 21:42:30 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -42,8 +42,8 @@
|
||||
|
||||
|
||||
/* non-export function prototypes */
|
||||
static void CopyTo(Relation rel, bool binary, bool oids, FILE * fp, char *delim);
|
||||
static void CopyFrom(Relation rel, bool binary, bool oids, FILE * fp, char *delim);
|
||||
static void CopyTo(Relation rel, bool binary, bool oids, FILE *fp, char *delim);
|
||||
static void CopyFrom(Relation rel, bool binary, bool oids, FILE *fp, char *delim);
|
||||
static Oid GetOutputFunction(Oid type);
|
||||
static Oid GetTypeElement(Oid type);
|
||||
static Oid GetInputFunction(Oid type);
|
||||
@ -51,17 +51,17 @@ static Oid IsTypeByVal(Oid type);
|
||||
static void
|
||||
GetIndexRelations(Oid main_relation_oid,
|
||||
int *n_indices,
|
||||
Relation ** index_rels);
|
||||
Relation **index_rels);
|
||||
|
||||
#ifdef COPY_PATCH
|
||||
static void CopyReadNewline(FILE * fp, int *newline);
|
||||
static char *CopyReadAttribute(FILE * fp, bool * isnull, char *delim, int *newline);
|
||||
static void CopyReadNewline(FILE *fp, int *newline);
|
||||
static char *CopyReadAttribute(FILE *fp, bool *isnull, char *delim, int *newline);
|
||||
|
||||
#else
|
||||
static char *CopyReadAttribute(FILE * fp, bool * isnull, char *delim);
|
||||
static char *CopyReadAttribute(FILE *fp, bool *isnull, char *delim);
|
||||
|
||||
#endif
|
||||
static void CopyAttributeOut(FILE * fp, char *string, char *delim);
|
||||
static void CopyAttributeOut(FILE *fp, char *string, char *delim);
|
||||
static int CountTuples(Relation relation);
|
||||
|
||||
extern FILE *Pfout,
|
||||
@ -197,7 +197,7 @@ DoCopy(char *relname, bool binary, bool oids, bool from, bool pipe,
|
||||
|
||||
|
||||
static void
|
||||
CopyTo(Relation rel, bool binary, bool oids, FILE * fp, char *delim)
|
||||
CopyTo(Relation rel, bool binary, bool oids, FILE *fp, char *delim)
|
||||
{
|
||||
HeapTuple tuple;
|
||||
HeapScanDesc scandesc;
|
||||
@ -356,7 +356,7 @@ CopyTo(Relation rel, bool binary, bool oids, FILE * fp, char *delim)
|
||||
}
|
||||
|
||||
static void
|
||||
CopyFrom(Relation rel, bool binary, bool oids, FILE * fp, char *delim)
|
||||
CopyFrom(Relation rel, bool binary, bool oids, FILE *fp, char *delim)
|
||||
{
|
||||
HeapTuple tuple;
|
||||
AttrNumber attr_count;
|
||||
@ -648,17 +648,17 @@ CopyFrom(Relation rel, bool binary, bool oids, FILE * fp, char *delim)
|
||||
switch (attr[i]->attlen)
|
||||
{
|
||||
case sizeof(char):
|
||||
values[i] = (Datum) * (unsigned char *) ptr;
|
||||
values[i] = (Datum) *(unsigned char *) ptr;
|
||||
ptr += sizeof(char);
|
||||
break;
|
||||
case sizeof(short):
|
||||
ptr = (char *) SHORTALIGN(ptr);
|
||||
values[i] = (Datum) * (unsigned short *) ptr;
|
||||
values[i] = (Datum) *(unsigned short *) ptr;
|
||||
ptr += sizeof(short);
|
||||
break;
|
||||
case sizeof(int32):
|
||||
ptr = (char *) INTALIGN(ptr);
|
||||
values[i] = (Datum) * (uint32 *) ptr;
|
||||
values[i] = (Datum) *(uint32 *) ptr;
|
||||
ptr += sizeof(int32);
|
||||
break;
|
||||
default:
|
||||
@ -904,12 +904,12 @@ typedef struct rel_list
|
||||
{
|
||||
Oid index_rel_oid;
|
||||
struct rel_list *next;
|
||||
} RelationList;
|
||||
} RelationList;
|
||||
|
||||
static void
|
||||
GetIndexRelations(Oid main_relation_oid,
|
||||
int *n_indices,
|
||||
Relation ** index_rels)
|
||||
Relation **index_rels)
|
||||
{
|
||||
RelationList *head,
|
||||
*scan;
|
||||
@ -1002,7 +1002,7 @@ inString(char c, char *s)
|
||||
*/
|
||||
|
||||
void
|
||||
CopyReadNewline(FILE * fp, int *newline)
|
||||
CopyReadNewline(FILE *fp, int *newline)
|
||||
{
|
||||
if (!*newline)
|
||||
{
|
||||
@ -1028,9 +1028,9 @@ CopyReadNewline(FILE * fp, int *newline)
|
||||
|
||||
static char *
|
||||
#ifdef COPY_PATCH
|
||||
CopyReadAttribute(FILE * fp, bool * isnull, char *delim, int *newline)
|
||||
CopyReadAttribute(FILE *fp, bool *isnull, char *delim, int *newline)
|
||||
#else
|
||||
CopyReadAttribute(FILE * fp, bool * isnull, char *delim)
|
||||
CopyReadAttribute(FILE *fp, bool *isnull, char *delim)
|
||||
#endif
|
||||
{
|
||||
static char attribute[EXT_ATTLEN];
|
||||
@ -1151,7 +1151,7 @@ CopyReadAttribute(FILE * fp, bool * isnull, char *delim)
|
||||
}
|
||||
|
||||
static void
|
||||
CopyAttributeOut(FILE * fp, char *string, char *delim)
|
||||
CopyAttributeOut(FILE *fp, char *string, char *delim)
|
||||
{
|
||||
char c;
|
||||
int is_array = false;
|
||||
|
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.16 1997/09/08 02:22:06 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.17 1997/09/08 21:42:33 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -35,9 +35,9 @@
|
||||
|
||||
static int
|
||||
checkAttrExists(char *attributeName,
|
||||
char *attributeType, List * schema);
|
||||
static List *MergeAttributes(List * schema, List * supers, List ** supconstr);
|
||||
static void StoreCatalogInheritance(Oid relationId, List * supers);
|
||||
char *attributeType, List *schema);
|
||||
static List *MergeAttributes(List *schema, List *supers, List **supconstr);
|
||||
static void StoreCatalogInheritance(Oid relationId, List *supers);
|
||||
|
||||
/* ----------------------------------------------------------------
|
||||
* DefineRelation --
|
||||
@ -45,7 +45,7 @@ static void StoreCatalogInheritance(Oid relationId, List * supers);
|
||||
* ----------------------------------------------------------------
|
||||
*/
|
||||
void
|
||||
DefineRelation(CreateStmt * stmt)
|
||||
DefineRelation(CreateStmt *stmt)
|
||||
{
|
||||
char *relname = palloc(NAMEDATALEN);
|
||||
List *schema = stmt->tableElts;
|
||||
@ -280,7 +280,7 @@ RemoveRelation(char *name)
|
||||
* stud_emp {7:percent}
|
||||
*/
|
||||
static List *
|
||||
MergeAttributes(List * schema, List * supers, List ** supconstr)
|
||||
MergeAttributes(List *schema, List *supers, List **supconstr)
|
||||
{
|
||||
List *entry;
|
||||
List *inhSchema = NIL;
|
||||
@ -459,7 +459,7 @@ MergeAttributes(List * schema, List * supers, List ** supconstr)
|
||||
* Updates the system catalogs with proper inheritance information.
|
||||
*/
|
||||
static void
|
||||
StoreCatalogInheritance(Oid relationId, List * supers)
|
||||
StoreCatalogInheritance(Oid relationId, List *supers)
|
||||
{
|
||||
Relation relation;
|
||||
TupleDesc desc;
|
||||
@ -640,7 +640,7 @@ again:
|
||||
* returns 1 if attribute already exists in schema, 0 otherwise.
|
||||
*/
|
||||
static int
|
||||
checkAttrExists(char *attributeName, char *attributeType, List * schema)
|
||||
checkAttrExists(char *attributeName, char *attributeType, List *schema)
|
||||
{
|
||||
List *s;
|
||||
|
||||
|
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/defind.c,v 1.15 1997/09/08 20:55:25 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/defind.c,v 1.16 1997/09/08 21:42:35 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -39,18 +39,18 @@
|
||||
#define IsFuncIndex(ATTR_LIST) (((IndexElem*)lfirst(ATTR_LIST))->args!=NULL)
|
||||
|
||||
/* non-export function prototypes */
|
||||
static void CheckPredicate(List * predList, List * rangeTable, Oid baseRelOid);
|
||||
static void CheckPredicate(List *predList, List *rangeTable, Oid baseRelOid);
|
||||
static void
|
||||
CheckPredExpr(Node * predicate, List * rangeTable,
|
||||
CheckPredExpr(Node *predicate, List *rangeTable,
|
||||
Oid baseRelOid);
|
||||
static void
|
||||
CheckPredClause(Expr * predicate, List * rangeTable, Oid baseRelOid);
|
||||
CheckPredClause(Expr *predicate, List *rangeTable, Oid baseRelOid);
|
||||
static void
|
||||
FuncIndexArgs(IndexElem * funcIndex, AttrNumber *attNumP,
|
||||
Oid * argTypes, Oid * opOidP, Oid relId);
|
||||
FuncIndexArgs(IndexElem *funcIndex, AttrNumber *attNumP,
|
||||
Oid *argTypes, Oid *opOidP, Oid relId);
|
||||
static void
|
||||
NormIndexAttrs(List * attList, AttrNumber *attNumP,
|
||||
Oid * opOidP, Oid relId);
|
||||
NormIndexAttrs(List *attList, AttrNumber *attNumP,
|
||||
Oid *opOidP, Oid relId);
|
||||
static char *GetDefaultOpClass(Oid atttypid);
|
||||
|
||||
/*
|
||||
@ -70,11 +70,11 @@ void
|
||||
DefineIndex(char *heapRelationName,
|
||||
char *indexRelationName,
|
||||
char *accessMethodName,
|
||||
List * attributeList,
|
||||
List * parameterList,
|
||||
List *attributeList,
|
||||
List *parameterList,
|
||||
bool unique,
|
||||
Expr * predicate,
|
||||
List * rangetable)
|
||||
Expr *predicate,
|
||||
List *rangetable)
|
||||
{
|
||||
Oid *classObjectId;
|
||||
Oid accessMethodId;
|
||||
@ -223,7 +223,7 @@ DefineIndex(char *heapRelationName,
|
||||
* XXX
|
||||
*/
|
||||
void
|
||||
ExtendIndex(char *indexRelationName, Expr * predicate, List * rangetable)
|
||||
ExtendIndex(char *indexRelationName, Expr *predicate, List *rangetable)
|
||||
{
|
||||
Oid *classObjectId;
|
||||
Oid accessMethodId;
|
||||
@ -364,7 +364,7 @@ ExtendIndex(char *indexRelationName, Expr * predicate, List * rangetable)
|
||||
*/
|
||||
|
||||
static void
|
||||
CheckPredicate(List * predList, List * rangeTable, Oid baseRelOid)
|
||||
CheckPredicate(List *predList, List *rangeTable, Oid baseRelOid)
|
||||
{
|
||||
List *item;
|
||||
|
||||
@ -375,7 +375,7 @@ CheckPredicate(List * predList, List * rangeTable, Oid baseRelOid)
|
||||
}
|
||||
|
||||
static void
|
||||
CheckPredExpr(Node * predicate, List * rangeTable, Oid baseRelOid)
|
||||
CheckPredExpr(Node *predicate, List *rangeTable, Oid baseRelOid)
|
||||
{
|
||||
List *clauses = NIL,
|
||||
*clause;
|
||||
@ -399,7 +399,7 @@ CheckPredExpr(Node * predicate, List * rangeTable, Oid baseRelOid)
|
||||
}
|
||||
|
||||
static void
|
||||
CheckPredClause(Expr * predicate, List * rangeTable, Oid baseRelOid)
|
||||
CheckPredClause(Expr *predicate, List *rangeTable, Oid baseRelOid)
|
||||
{
|
||||
Var *pred_var;
|
||||
Const *pred_const;
|
||||
@ -421,10 +421,10 @@ CheckPredClause(Expr * predicate, List * rangeTable, Oid baseRelOid)
|
||||
|
||||
|
||||
static void
|
||||
FuncIndexArgs(IndexElem * funcIndex,
|
||||
FuncIndexArgs(IndexElem *funcIndex,
|
||||
AttrNumber *attNumP,
|
||||
Oid * argTypes,
|
||||
Oid * opOidP,
|
||||
Oid *argTypes,
|
||||
Oid *opOidP,
|
||||
Oid relId)
|
||||
{
|
||||
List *rest;
|
||||
@ -470,9 +470,9 @@ FuncIndexArgs(IndexElem * funcIndex,
|
||||
}
|
||||
|
||||
static void
|
||||
NormIndexAttrs(List * attList, /* list of IndexElem's */
|
||||
NormIndexAttrs(List *attList, /* list of IndexElem's */
|
||||
AttrNumber *attNumP,
|
||||
Oid * opOidP,
|
||||
Oid *opOidP,
|
||||
Oid relId)
|
||||
{
|
||||
List *rest;
|
||||
|
@ -9,7 +9,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/define.c,v 1.15 1997/09/08 02:22:09 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/define.c,v 1.16 1997/09/08 21:42:38 momjian Exp $
|
||||
*
|
||||
* DESCRIPTION
|
||||
* The "DefineFoo" routines take the parse tree and pick out the
|
||||
@ -53,8 +53,8 @@
|
||||
#include <tcop/dest.h>
|
||||
#include <catalog/pg_user.h>
|
||||
|
||||
static char *defGetString(DefElem * def);
|
||||
static int defGetTypeLength(DefElem * def);
|
||||
static char *defGetString(DefElem *def);
|
||||
static int defGetTypeLength(DefElem *def);
|
||||
|
||||
#define DEFAULT_TYPDELIM ','
|
||||
|
||||
@ -80,8 +80,8 @@ case_translate_language_name(const char *input, char *output)
|
||||
|
||||
|
||||
static void
|
||||
compute_return_type(const Node * returnType,
|
||||
char **prorettype_p, bool * returnsSet_p)
|
||||
compute_return_type(const Node *returnType,
|
||||
char **prorettype_p, bool *returnsSet_p)
|
||||
{
|
||||
/*---------------------------------------------------------------------------
|
||||
Examine the "returns" clause returnType of the CREATE FUNCTION statement
|
||||
@ -106,9 +106,9 @@ compute_return_type(const Node * returnType,
|
||||
|
||||
|
||||
static void
|
||||
compute_full_attributes(const List * parameters, int32 * byte_pct_p,
|
||||
int32 * perbyte_cpu_p, int32 * percall_cpu_p,
|
||||
int32 * outin_ratio_p, bool * canCache_p)
|
||||
compute_full_attributes(const List *parameters, int32 *byte_pct_p,
|
||||
int32 *perbyte_cpu_p, int32 *percall_cpu_p,
|
||||
int32 *outin_ratio_p, bool *canCache_p)
|
||||
{
|
||||
/*--------------------------------------------------------------------------
|
||||
Interpret the parameters *parameters and return their contents as
|
||||
@ -210,7 +210,7 @@ interpret_AS_clause(const char languageName[], const char as[],
|
||||
*
|
||||
*/
|
||||
void
|
||||
CreateFunction(ProcedureStmt * stmt, CommandDest dest)
|
||||
CreateFunction(ProcedureStmt *stmt, CommandDest dest)
|
||||
{
|
||||
char *probin_str;
|
||||
|
||||
@ -315,7 +315,7 @@ CreateFunction(ProcedureStmt * stmt, CommandDest dest)
|
||||
*/
|
||||
void
|
||||
DefineOperator(char *oprName,
|
||||
List * parameters)
|
||||
List *parameters)
|
||||
{
|
||||
uint16 precedence = 0; /* operator precedence */
|
||||
bool canHash = false;/* operator hashes */
|
||||
@ -461,7 +461,7 @@ DefineOperator(char *oprName,
|
||||
* ------------------
|
||||
*/
|
||||
void
|
||||
DefineAggregate(char *aggName, List * parameters)
|
||||
DefineAggregate(char *aggName, List *parameters)
|
||||
|
||||
{
|
||||
char *stepfunc1Name = NULL;
|
||||
@ -570,7 +570,7 @@ DefineAggregate(char *aggName, List * parameters)
|
||||
*
|
||||
*/
|
||||
void
|
||||
DefineType(char *typeName, List * parameters)
|
||||
DefineType(char *typeName, List *parameters)
|
||||
{
|
||||
int16 internalLength = 0; /* int2 */
|
||||
int16 externalLength = 0; /* int2 */
|
||||
@ -720,7 +720,7 @@ DefineType(char *typeName, List * parameters)
|
||||
}
|
||||
|
||||
static char *
|
||||
defGetString(DefElem * def)
|
||||
defGetString(DefElem *def)
|
||||
{
|
||||
if (nodeTag(def->arg) != T_String)
|
||||
elog(WARN, "Define: \"%s\" = what?", def->defname);
|
||||
@ -728,7 +728,7 @@ defGetString(DefElem * def)
|
||||
}
|
||||
|
||||
static int
|
||||
defGetTypeLength(DefElem * def)
|
||||
defGetTypeLength(DefElem *def)
|
||||
{
|
||||
if (nodeTag(def->arg) == T_Integer)
|
||||
return (intVal(def->arg));
|
||||
|
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/explain.c,v 1.12 1997/09/08 02:22:10 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/explain.c,v 1.13 1997/09/08 21:42:40 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -32,9 +32,9 @@ typedef struct ExplainState
|
||||
bool printNodes; /* do nodeToString() instead */
|
||||
/* other states */
|
||||
List *rtable; /* range table */
|
||||
} ExplainState;
|
||||
} ExplainState;
|
||||
|
||||
static char *Explain_PlanToString(Plan * plan, ExplainState * es);
|
||||
static char *Explain_PlanToString(Plan *plan, ExplainState *es);
|
||||
|
||||
/*
|
||||
* ExplainQuery -
|
||||
@ -42,7 +42,7 @@ static char *Explain_PlanToString(Plan * plan, ExplainState * es);
|
||||
*
|
||||
*/
|
||||
void
|
||||
ExplainQuery(Query * query, bool verbose, CommandDest dest)
|
||||
ExplainQuery(Query *query, bool verbose, CommandDest dest)
|
||||
{
|
||||
char *s = NULL,
|
||||
*s2;
|
||||
@ -116,7 +116,7 @@ ExplainQuery(Query * query, bool verbose, CommandDest dest)
|
||||
* converts a Node into ascii string and append it to 'str'
|
||||
*/
|
||||
static void
|
||||
explain_outNode(StringInfo str, Plan * plan, int indent, ExplainState * es)
|
||||
explain_outNode(StringInfo str, Plan *plan, int indent, ExplainState *es)
|
||||
{
|
||||
char *pname;
|
||||
char buf[1000];
|
||||
@ -225,7 +225,7 @@ explain_outNode(StringInfo str, Plan * plan, int indent, ExplainState * es)
|
||||
}
|
||||
|
||||
static char *
|
||||
Explain_PlanToString(Plan * plan, ExplainState * es)
|
||||
Explain_PlanToString(Plan *plan, ExplainState *es)
|
||||
{
|
||||
StringInfo str;
|
||||
char *s;
|
||||
|
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/recipe.c,v 1.8 1997/09/08 02:22:12 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/recipe.c,v 1.9 1997/09/08 21:42:42 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -36,7 +36,7 @@ extern CommandDest whereToSendOutput;
|
||||
#ifndef TIOGA
|
||||
|
||||
void
|
||||
beginRecipe(RecipeStmt * stmt)
|
||||
beginRecipe(RecipeStmt *stmt)
|
||||
{
|
||||
elog(NOTICE, "You must compile with TIOGA defined in order to use recipes\n");
|
||||
}
|
||||
@ -61,36 +61,36 @@ typedef struct _teeInfo
|
||||
TeePlanInfo *val;
|
||||
} TeeInfo;
|
||||
|
||||
QueryTreeList *appendQlist(QueryTreeList * q1, QueryTreeList * q2);
|
||||
void OffsetVarAttno(Node * node, int varno, int offset);
|
||||
QueryTreeList *appendQlist(QueryTreeList *q1, QueryTreeList *q2);
|
||||
void OffsetVarAttno(Node *node, int varno, int offset);
|
||||
|
||||
static void
|
||||
appendTeeQuery(TeeInfo * teeInfo,
|
||||
QueryTreeList * q,
|
||||
QueryTreeList *q,
|
||||
char *teeNodeName);
|
||||
|
||||
static Plan *
|
||||
replaceTeeScans(Plan * plan,
|
||||
Query * parsetree,
|
||||
replaceTeeScans(Plan *plan,
|
||||
Query *parsetree,
|
||||
TeeInfo * teeInfo);
|
||||
static void
|
||||
replaceSeqScan(Plan * plan,
|
||||
Plan * parent,
|
||||
replaceSeqScan(Plan *plan,
|
||||
Plan *parent,
|
||||
int rt_ind,
|
||||
Plan * tplan);
|
||||
Plan *tplan);
|
||||
|
||||
static void
|
||||
tg_rewriteQuery(TgRecipe * r, TgNode * n,
|
||||
QueryTreeList * q,
|
||||
QueryTreeList * inputQlist);
|
||||
QueryTreeList *q,
|
||||
QueryTreeList *inputQlist);
|
||||
static Node *
|
||||
tg_replaceNumberedParam(Node * expression,
|
||||
tg_replaceNumberedParam(Node *expression,
|
||||
int pnum,
|
||||
int rt_ind,
|
||||
char *teeRelName);
|
||||
static Node *
|
||||
tg_rewriteParamsInExpr(Node * expression,
|
||||
QueryTreeList * inputQlist);
|
||||
tg_rewriteParamsInExpr(Node *expression,
|
||||
QueryTreeList *inputQlist);
|
||||
static QueryTreeList *
|
||||
tg_parseSubQuery(TgRecipe * r,
|
||||
TgNode * n,
|
||||
@ -99,7 +99,7 @@ static QueryTreeList *
|
||||
tg_parseTeeNode(TgRecipe * r,
|
||||
TgNode * n,
|
||||
int i,
|
||||
QueryTreeList * qList,
|
||||
QueryTreeList *qList,
|
||||
TeeInfo * teeInfo);
|
||||
|
||||
|
||||
@ -127,7 +127,7 @@ tg_parseTeeNode(TgRecipe * r,
|
||||
*/
|
||||
|
||||
void
|
||||
beginRecipe(RecipeStmt * stmt)
|
||||
beginRecipe(RecipeStmt *stmt)
|
||||
{
|
||||
TgRecipe *r;
|
||||
int i;
|
||||
@ -317,8 +317,8 @@ beginRecipe(RecipeStmt * stmt)
|
||||
static void
|
||||
tg_rewriteQuery(TgRecipe * r,
|
||||
TgNode * n,
|
||||
QueryTreeList * q,
|
||||
QueryTreeList * inputQlist)
|
||||
QueryTreeList *q,
|
||||
QueryTreeList *inputQlist)
|
||||
{
|
||||
Query *orig;
|
||||
Query *inputQ;
|
||||
@ -426,7 +426,7 @@ tg_rewriteQuery(TgRecipe * r,
|
||||
|
||||
*/
|
||||
static Node *
|
||||
tg_replaceNumberedParam(Node * expression,
|
||||
tg_replaceNumberedParam(Node *expression,
|
||||
int pnum, /* the number of the parameter */
|
||||
int rt_ind, /* the range table index */
|
||||
char *teeRelName) /* the relname of the tee
|
||||
@ -573,7 +573,7 @@ tg_replaceNumberedParam(Node * expression,
|
||||
|
||||
*/
|
||||
static Node *
|
||||
tg_rewriteParamsInExpr(Node * expression, QueryTreeList * inputQlist)
|
||||
tg_rewriteParamsInExpr(Node *expression, QueryTreeList *inputQlist)
|
||||
{
|
||||
List *tl;
|
||||
TargetEntry *param_tle,
|
||||
@ -759,7 +759,7 @@ static QueryTreeList *
|
||||
tg_parseTeeNode(TgRecipe * r,
|
||||
TgNode * n, /* the tee node */
|
||||
int i, /* which input this node is to its parent */
|
||||
QueryTreeList * qList,
|
||||
QueryTreeList *qList,
|
||||
TeeInfo * teeInfo)
|
||||
|
||||
{
|
||||
@ -1104,7 +1104,7 @@ tg_parseSubQuery(TgRecipe * r, TgNode * n, TeeInfo * teeInfo)
|
||||
*/
|
||||
|
||||
void
|
||||
OffsetVarAttno(Node * node, int varno, int offset)
|
||||
OffsetVarAttno(Node *node, int varno, int offset)
|
||||
{
|
||||
if (node == NULL)
|
||||
return;
|
||||
@ -1157,7 +1157,7 @@ OffsetVarAttno(Node * node, int varno, int offset)
|
||||
*/
|
||||
|
||||
QueryTreeList *
|
||||
appendQlist(QueryTreeList * q1, QueryTreeList * q2)
|
||||
appendQlist(QueryTreeList *q1, QueryTreeList *q2)
|
||||
{
|
||||
QueryTreeList *newq;
|
||||
int i,
|
||||
@ -1189,7 +1189,7 @@ appendQlist(QueryTreeList * q1, QueryTreeList * q2)
|
||||
* modify the query field of the teeInfo list of the particular tee node
|
||||
*/
|
||||
static void
|
||||
appendTeeQuery(TeeInfo * teeInfo, QueryTreeList * q, char *teeNodeName)
|
||||
appendTeeQuery(TeeInfo * teeInfo, QueryTreeList *q, char *teeNodeName)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -1220,8 +1220,8 @@ appendTeeQuery(TeeInfo * teeInfo, QueryTreeList * q, char *teeNodeName)
|
||||
* qual or targetlist because the child plan has been replaced with a tee node
|
||||
*/
|
||||
static void
|
||||
replaceSeqScan(Plan * plan, Plan * parent,
|
||||
int rt_ind, Plan * tplan)
|
||||
replaceSeqScan(Plan *plan, Plan *parent,
|
||||
int rt_ind, Plan *tplan)
|
||||
{
|
||||
Scan *snode;
|
||||
Tee *teePlan;
|
||||
@ -1307,7 +1307,7 @@ replaceSeqScan(Plan * plan, Plan * parent,
|
||||
* a connection to the actual tee plan node
|
||||
*/
|
||||
static Plan *
|
||||
replaceTeeScans(Plan * plan, Query * parsetree, TeeInfo * teeInfo)
|
||||
replaceTeeScans(Plan *plan, Query *parsetree, TeeInfo * teeInfo)
|
||||
{
|
||||
|
||||
int i;
|
||||
|
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/remove.c,v 1.13 1997/09/08 20:55:27 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/Attic/remove.c,v 1.14 1997/09/08 21:42:44 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -330,7 +330,7 @@ RemoveType(char *typeName) /* type name to be removed */
|
||||
void
|
||||
RemoveFunction(char *functionName, /* function name to be removed */
|
||||
int nargs,
|
||||
List * argNameList /* list of TypeNames */ )
|
||||
List *argNameList /* list of TypeNames */ )
|
||||
{
|
||||
Relation relation;
|
||||
HeapScanDesc scan;
|
||||
|
@ -36,14 +36,14 @@ typedef struct FormData_pg_sequence
|
||||
int4 cache_value;
|
||||
char is_cycled;
|
||||
char is_called;
|
||||
} FormData_pg_sequence;
|
||||
} FormData_pg_sequence;
|
||||
|
||||
typedef FormData_pg_sequence *SequenceTupleForm;
|
||||
|
||||
typedef struct sequence_magic
|
||||
{
|
||||
uint32 magic;
|
||||
} sequence_magic;
|
||||
} sequence_magic;
|
||||
|
||||
typedef struct SeqTableData
|
||||
{
|
||||
@ -54,7 +54,7 @@ typedef struct SeqTableData
|
||||
int4 last;
|
||||
int4 increment;
|
||||
struct SeqTableData *next;
|
||||
} SeqTableData;
|
||||
} SeqTableData;
|
||||
|
||||
typedef SeqTableData *SeqTable;
|
||||
|
||||
@ -62,15 +62,15 @@ static SeqTable seqtab = NULL;
|
||||
|
||||
static SeqTable init_sequence(char *caller, char *name);
|
||||
static SequenceTupleForm read_info(char *caller, SeqTable elm, Buffer *buf);
|
||||
static void init_params(CreateSeqStmt * seq, SequenceTupleForm new);
|
||||
static int get_param(DefElem * def);
|
||||
static void init_params(CreateSeqStmt *seq, SequenceTupleForm new);
|
||||
static int get_param(DefElem *def);
|
||||
|
||||
/*
|
||||
* DefineSequence --
|
||||
* Creates a new sequence relation
|
||||
*/
|
||||
void
|
||||
DefineSequence(CreateSeqStmt * seq)
|
||||
DefineSequence(CreateSeqStmt *seq)
|
||||
{
|
||||
FormData_pg_sequence new;
|
||||
CreateStmt *stmt = makeNode(CreateStmt);
|
||||
@ -459,7 +459,7 @@ CloseSequences(void)
|
||||
|
||||
|
||||
static void
|
||||
init_params(CreateSeqStmt * seq, SequenceTupleForm new)
|
||||
init_params(CreateSeqStmt *seq, SequenceTupleForm new)
|
||||
{
|
||||
DefElem *last_value = NULL;
|
||||
DefElem *increment_by = NULL;
|
||||
@ -544,7 +544,7 @@ init_params(CreateSeqStmt * seq, SequenceTupleForm new)
|
||||
|
||||
|
||||
static int
|
||||
get_param(DefElem * def)
|
||||
get_param(DefElem *def)
|
||||
{
|
||||
if (def->arg == (Node *) NULL)
|
||||
elog(WARN, "DefineSequence: \"%s\" value unspecified", def->defname);
|
||||
|
@ -37,13 +37,13 @@ TriggerData *CurrentTriggerData = NULL;
|
||||
void RelationBuildTriggers(Relation relation);
|
||||
void FreeTriggerDesc(Relation relation);
|
||||
|
||||
static void DescribeTrigger(TriggerDesc * trigdesc, Trigger * trigger);
|
||||
static void DescribeTrigger(TriggerDesc *trigdesc, Trigger *trigger);
|
||||
|
||||
extern void fmgr_info(Oid procedureId, func_ptr * function, int *nargs);
|
||||
extern void fmgr_info(Oid procedureId, func_ptr *function, int *nargs);
|
||||
extern GlobalMemory CacheCxt;
|
||||
|
||||
void
|
||||
CreateTrigger(CreateTrigStmt * stmt)
|
||||
CreateTrigger(CreateTrigStmt *stmt)
|
||||
{
|
||||
int16 tgtype;
|
||||
int16 tgattr[8] = {0};
|
||||
@ -211,7 +211,7 @@ CreateTrigger(CreateTrigStmt * stmt)
|
||||
}
|
||||
|
||||
void
|
||||
DropTrigger(DropTrigStmt * stmt)
|
||||
DropTrigger(DropTrigStmt *stmt)
|
||||
{
|
||||
Relation rel;
|
||||
Relation tgrel;
|
||||
@ -481,7 +481,7 @@ FreeTriggerDesc(Relation relation)
|
||||
}
|
||||
|
||||
static void
|
||||
DescribeTrigger(TriggerDesc * trigdesc, Trigger * trigger)
|
||||
DescribeTrigger(TriggerDesc *trigdesc, Trigger *trigger)
|
||||
{
|
||||
uint16 *n;
|
||||
Trigger ***t,
|
||||
|
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.45 1997/09/08 20:55:34 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.46 1997/09/08 21:42:48 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -74,37 +74,37 @@ static int MESSAGE_LEVEL; /* message level */
|
||||
/* non-export function prototypes */
|
||||
static void vc_init(void);
|
||||
static void vc_shutdown(void);
|
||||
static void vc_vacuum(NameData * VacRelP, bool analyze, List * va_cols);
|
||||
static VRelList vc_getrels(NameData * VacRelP);
|
||||
static void vc_vacone(Oid relid, bool analyze, List * va_cols);
|
||||
static void vc_scanheap(VRelStats * vacrelstats, Relation onerel, VPageList Vvpl, VPageList Fvpl);
|
||||
static void vc_rpfheap(VRelStats * vacrelstats, Relation onerel, VPageList Vvpl, VPageList Fvpl, int nindices, Relation * Irel);
|
||||
static void vc_vacheap(VRelStats * vacrelstats, Relation onerel, VPageList vpl);
|
||||
static void vc_vacuum(NameData *VacRelP, bool analyze, List *va_cols);
|
||||
static VRelList vc_getrels(NameData *VacRelP);
|
||||
static void vc_vacone(Oid relid, bool analyze, List *va_cols);
|
||||
static void vc_scanheap(VRelStats *vacrelstats, Relation onerel, VPageList Vvpl, VPageList Fvpl);
|
||||
static void vc_rpfheap(VRelStats *vacrelstats, Relation onerel, VPageList Vvpl, VPageList Fvpl, int nindices, Relation *Irel);
|
||||
static void vc_vacheap(VRelStats *vacrelstats, Relation onerel, VPageList vpl);
|
||||
static void vc_vacpage(Page page, VPageDescr vpd, Relation archrel);
|
||||
static void vc_vaconeind(VPageList vpl, Relation indrel, int nhtups);
|
||||
static void vc_scanoneind(Relation indrel, int nhtups);
|
||||
static void vc_attrstats(Relation onerel, VRelStats * vacrelstats, HeapTuple htup);
|
||||
static void vc_bucketcpy(AttributeTupleForm attr, Datum value, Datum * bucket, int16 * bucket_len);
|
||||
static void vc_updstats(Oid relid, int npages, int ntups, bool hasindex, VRelStats * vacrelstats);
|
||||
static void vc_attrstats(Relation onerel, VRelStats *vacrelstats, HeapTuple htup);
|
||||
static void vc_bucketcpy(AttributeTupleForm attr, Datum value, Datum *bucket, int16 *bucket_len);
|
||||
static void vc_updstats(Oid relid, int npages, int ntups, bool hasindex, VRelStats *vacrelstats);
|
||||
static void vc_delhilowstats(Oid relid, int attcnt, int *attnums);
|
||||
static void vc_setpagelock(Relation rel, BlockNumber blkno);
|
||||
static VPageDescr vc_tidreapped(ItemPointer itemptr, VPageList vpl);
|
||||
static void vc_reappage(VPageList vpl, VPageDescr vpc);
|
||||
static void vc_vpinsert(VPageList vpl, VPageDescr vpnew);
|
||||
static void vc_free(VRelList vrl);
|
||||
static void vc_getindices(Oid relid, int *nindices, Relation ** Irel);
|
||||
static void vc_clsindices(int nindices, Relation * Irel);
|
||||
static void vc_getindices(Oid relid, int *nindices, Relation **Irel);
|
||||
static void vc_clsindices(int nindices, Relation *Irel);
|
||||
static Relation vc_getarchrel(Relation heaprel);
|
||||
static void vc_archive(Relation archrel, HeapTuple htup);
|
||||
static bool vc_isarchrel(char *rname);
|
||||
static void vc_mkindesc(Relation onerel, int nindices, Relation * Irel, IndDesc ** Idesc);
|
||||
static void vc_mkindesc(Relation onerel, int nindices, Relation *Irel, IndDesc **Idesc);
|
||||
static char *vc_find_eq(char *bot, int nelem, int size, char *elm, int (*compar) (char *, char *));
|
||||
static int vc_cmp_blk(char *left, char *right);
|
||||
static int vc_cmp_offno(char *left, char *right);
|
||||
static bool vc_enough_space(VPageDescr vpd, Size len);
|
||||
|
||||
void
|
||||
vacuum(char *vacrel, bool verbose, bool analyze, List * va_spec)
|
||||
vacuum(char *vacrel, bool verbose, bool analyze, List *va_spec)
|
||||
{
|
||||
char *pname;
|
||||
MemoryContext old;
|
||||
@ -236,7 +236,7 @@ vc_abort()
|
||||
* locks at one time.
|
||||
*/
|
||||
static void
|
||||
vc_vacuum(NameData * VacRelP, bool analyze, List * va_cols)
|
||||
vc_vacuum(NameData *VacRelP, bool analyze, List *va_cols)
|
||||
{
|
||||
VRelList vrl,
|
||||
cur;
|
||||
@ -255,7 +255,7 @@ vc_vacuum(NameData * VacRelP, bool analyze, List * va_cols)
|
||||
}
|
||||
|
||||
static VRelList
|
||||
vc_getrels(NameData * VacRelP)
|
||||
vc_getrels(NameData *VacRelP)
|
||||
{
|
||||
Relation pgclass;
|
||||
TupleDesc pgcdesc;
|
||||
@ -402,7 +402,7 @@ vc_getrels(NameData * VacRelP)
|
||||
* us to lock the entire database during one pass of the vacuum cleaner.
|
||||
*/
|
||||
static void
|
||||
vc_vacone(Oid relid, bool analyze, List * va_cols)
|
||||
vc_vacone(Oid relid, bool analyze, List *va_cols)
|
||||
{
|
||||
Relation pgclass;
|
||||
TupleDesc pgcdesc;
|
||||
@ -639,7 +639,7 @@ vc_vacone(Oid relid, bool analyze, List * va_cols)
|
||||
* on the number of live tuples in a heap.
|
||||
*/
|
||||
static void
|
||||
vc_scanheap(VRelStats * vacrelstats, Relation onerel,
|
||||
vc_scanheap(VRelStats *vacrelstats, Relation onerel,
|
||||
VPageList Vvpl, VPageList Fvpl)
|
||||
{
|
||||
int nblocks,
|
||||
@ -969,8 +969,8 @@ Tup %u: Vac %u, Crash %u, UnUsed %u, MinLen %u, MaxLen %u; Re-using: Free/Avail.
|
||||
* if some end-blocks are gone away.
|
||||
*/
|
||||
static void
|
||||
vc_rpfheap(VRelStats * vacrelstats, Relation onerel,
|
||||
VPageList Vvpl, VPageList Fvpl, int nindices, Relation * Irel)
|
||||
vc_rpfheap(VRelStats *vacrelstats, Relation onerel,
|
||||
VPageList Vvpl, VPageList Fvpl, int nindices, Relation *Irel)
|
||||
{
|
||||
TransactionId myXID;
|
||||
CommandId myCID;
|
||||
@ -1424,7 +1424,7 @@ Elapsed %u/%u sec.",
|
||||
* if there are "empty" end-blocks.
|
||||
*/
|
||||
static void
|
||||
vc_vacheap(VRelStats * vacrelstats, Relation onerel, VPageList Vvpl)
|
||||
vc_vacheap(VRelStats *vacrelstats, Relation onerel, VPageList Vvpl)
|
||||
{
|
||||
Buffer buf;
|
||||
Page page;
|
||||
@ -1700,7 +1700,7 @@ vc_tidreapped(ItemPointer itemptr, VPageList vpl)
|
||||
*
|
||||
*/
|
||||
static void
|
||||
vc_attrstats(Relation onerel, VRelStats * vacrelstats, HeapTuple htup)
|
||||
vc_attrstats(Relation onerel, VRelStats *vacrelstats, HeapTuple htup)
|
||||
{
|
||||
int i,
|
||||
attr_cnt = vacrelstats->va_natts;
|
||||
@ -1800,7 +1800,7 @@ vc_attrstats(Relation onerel, VRelStats * vacrelstats, HeapTuple htup)
|
||||
*
|
||||
*/
|
||||
static void
|
||||
vc_bucketcpy(AttributeTupleForm attr, Datum value, Datum * bucket, int16 * bucket_len)
|
||||
vc_bucketcpy(AttributeTupleForm attr, Datum value, Datum *bucket, int16 *bucket_len)
|
||||
{
|
||||
if (attr->attbyval && attr->attlen != -1)
|
||||
*bucket = value;
|
||||
@ -1831,7 +1831,7 @@ vc_bucketcpy(AttributeTupleForm attr, Datum value, Datum * bucket, int16 * bucke
|
||||
* historical queries very expensive.
|
||||
*/
|
||||
static void
|
||||
vc_updstats(Oid relid, int npages, int ntups, bool hasindex, VRelStats * vacrelstats)
|
||||
vc_updstats(Oid relid, int npages, int ntups, bool hasindex, VRelStats *vacrelstats)
|
||||
{
|
||||
Relation rd,
|
||||
ad,
|
||||
@ -2259,7 +2259,7 @@ vc_cmp_offno(char *left, char *right)
|
||||
|
||||
|
||||
static void
|
||||
vc_getindices(Oid relid, int *nindices, Relation ** Irel)
|
||||
vc_getindices(Oid relid, int *nindices, Relation **Irel)
|
||||
{
|
||||
Relation pgindex;
|
||||
Relation irel;
|
||||
@ -2336,7 +2336,7 @@ vc_getindices(Oid relid, int *nindices, Relation ** Irel)
|
||||
|
||||
|
||||
static void
|
||||
vc_clsindices(int nindices, Relation * Irel)
|
||||
vc_clsindices(int nindices, Relation *Irel)
|
||||
{
|
||||
|
||||
if (Irel == (Relation *) NULL)
|
||||
@ -2352,7 +2352,7 @@ vc_clsindices(int nindices, Relation * Irel)
|
||||
|
||||
|
||||
static void
|
||||
vc_mkindesc(Relation onerel, int nindices, Relation * Irel, IndDesc ** Idesc)
|
||||
vc_mkindesc(Relation onerel, int nindices, Relation *Irel, IndDesc **Idesc)
|
||||
{
|
||||
IndDesc *idcur;
|
||||
HeapTuple pgIndexTup;
|
||||
|
@ -7,7 +7,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/view.c,v 1.10 1997/09/08 02:22:20 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/commands/view.c,v 1.11 1997/09/08 21:42:50 momjian Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@ -42,7 +42,7 @@
|
||||
*---------------------------------------------------------------------
|
||||
*/
|
||||
static void
|
||||
DefineVirtualRelation(char *relname, List * tlist)
|
||||
DefineVirtualRelation(char *relname, List *tlist)
|
||||
{
|
||||
CreateStmt createStmt;
|
||||
List *attrList,
|
||||
@ -143,7 +143,7 @@ MakeRetrieveViewRuleName(char *viewName)
|
||||
}
|
||||
|
||||
static RuleStmt *
|
||||
FormViewRetrieveRule(char *viewName, Query * viewParse)
|
||||
FormViewRetrieveRule(char *viewName, Query *viewParse)
|
||||
{
|
||||
RuleStmt *rule;
|
||||
char *rname;
|
||||
@ -170,7 +170,7 @@ FormViewRetrieveRule(char *viewName, Query * viewParse)
|
||||
}
|
||||
|
||||
static void
|
||||
DefineViewRules(char *viewName, Query * viewParse)
|
||||
DefineViewRules(char *viewName, Query *viewParse)
|
||||
{
|
||||
RuleStmt *retrieve_rule = NULL;
|
||||
|
||||
@ -224,7 +224,7 @@ DefineViewRules(char *viewName, Query * viewParse)
|
||||
*---------------------------------------------------------------
|
||||
*/
|
||||
static void
|
||||
UpdateRangeTableOfViewParse(char *viewName, Query * viewParse)
|
||||
UpdateRangeTableOfViewParse(char *viewName, Query *viewParse)
|
||||
{
|
||||
List *old_rt;
|
||||
List *new_rt;
|
||||
@ -275,7 +275,7 @@ UpdateRangeTableOfViewParse(char *viewName, Query * viewParse)
|
||||
*-------------------------------------------------------------------
|
||||
*/
|
||||
void
|
||||
DefineView(char *viewName, Query * viewParse)
|
||||
DefineView(char *viewName, Query *viewParse)
|
||||
{
|
||||
List *viewTlist;
|
||||
|
||||
|
Reference in New Issue
Block a user