mirror of
https://github.com/postgres/postgres.git
synced 2025-06-07 11:02:12 +03:00
Small code cleanups,formatting.
This commit is contained in:
parent
27b0e8c0b0
commit
dc0ff5c67a
@ -12,7 +12,7 @@
|
|||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtree.c,v 1.80 2001/05/07 00:43:16 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtree.c,v 1.81 2001/05/18 21:24:17 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -57,10 +57,8 @@ btbuild(PG_FUNCTION_ARGS)
|
|||||||
Relation index = (Relation) PG_GETARG_POINTER(1);
|
Relation index = (Relation) PG_GETARG_POINTER(1);
|
||||||
IndexInfo *indexInfo = (IndexInfo *) PG_GETARG_POINTER(2);
|
IndexInfo *indexInfo = (IndexInfo *) PG_GETARG_POINTER(2);
|
||||||
Node *oldPred = (Node *) PG_GETARG_POINTER(3);
|
Node *oldPred = (Node *) PG_GETARG_POINTER(3);
|
||||||
|
|
||||||
#ifdef NOT_USED
|
#ifdef NOT_USED
|
||||||
IndexStrategy istrat = (IndexStrategy) PG_GETARG_POINTER(4);
|
IndexStrategy istrat = (IndexStrategy) PG_GETARG_POINTER(4);
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
HeapScanDesc hscan;
|
HeapScanDesc hscan;
|
||||||
HeapTuple htup;
|
HeapTuple htup;
|
||||||
@ -72,11 +70,9 @@ btbuild(PG_FUNCTION_ARGS)
|
|||||||
double nhtups,
|
double nhtups,
|
||||||
nitups;
|
nitups;
|
||||||
Node *pred = indexInfo->ii_Predicate;
|
Node *pred = indexInfo->ii_Predicate;
|
||||||
|
|
||||||
#ifndef OMIT_PARTIAL_INDEX
|
#ifndef OMIT_PARTIAL_INDEX
|
||||||
TupleTable tupleTable;
|
TupleTable tupleTable;
|
||||||
TupleTableSlot *slot;
|
TupleTableSlot *slot;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
ExprContext *econtext;
|
ExprContext *econtext;
|
||||||
InsertIndexResult res = NULL;
|
InsertIndexResult res = NULL;
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/commands/define.c,v 1.54 2001/03/22 06:16:11 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/commands/define.c,v 1.55 2001/05/18 21:24:18 momjian Exp $
|
||||||
*
|
*
|
||||||
* DESCRIPTION
|
* DESCRIPTION
|
||||||
* The "DefineFoo" routines take the parse tree and pick out the
|
* The "DefineFoo" routines take the parse tree and pick out the
|
||||||
@ -384,15 +384,15 @@ DefineOperator(char *oprName,
|
|||||||
if (strcasecmp(defel->defname, "leftarg") == 0)
|
if (strcasecmp(defel->defname, "leftarg") == 0)
|
||||||
{
|
{
|
||||||
typeName1 = defGetString(defel);
|
typeName1 = defGetString(defel);
|
||||||
if (IsA(defel->arg, TypeName)
|
if (IsA(defel->arg, TypeName) &&
|
||||||
&&((TypeName *) defel->arg)->setof)
|
((TypeName *) defel->arg)->setof)
|
||||||
elog(ERROR, "setof type not implemented for leftarg");
|
elog(ERROR, "setof type not implemented for leftarg");
|
||||||
}
|
}
|
||||||
else if (strcasecmp(defel->defname, "rightarg") == 0)
|
else if (strcasecmp(defel->defname, "rightarg") == 0)
|
||||||
{
|
{
|
||||||
typeName2 = defGetString(defel);
|
typeName2 = defGetString(defel);
|
||||||
if (IsA(defel->arg, TypeName)
|
if (IsA(defel->arg, TypeName) &&
|
||||||
&&((TypeName *) defel->arg)->setof)
|
((TypeName *) defel->arg)->setof)
|
||||||
elog(ERROR, "setof type not implemented for rightarg");
|
elog(ERROR, "setof type not implemented for rightarg");
|
||||||
}
|
}
|
||||||
else if (strcasecmp(defel->defname, "procedure") == 0)
|
else if (strcasecmp(defel->defname, "procedure") == 0)
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.192 2001/05/17 15:55:24 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.193 2001/05/18 21:24:18 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -836,7 +836,9 @@ scan_heap(VRelStats *vacrelstats, Relation onerel,
|
|||||||
* If tuple is recently deleted then we must not remove it
|
* If tuple is recently deleted then we must not remove it
|
||||||
* from relation.
|
* from relation.
|
||||||
*/
|
*/
|
||||||
if (tupgone && (tuple.t_data->t_infomask & HEAP_XMIN_INVALID) == 0 && tuple.t_data->t_xmax >= XmaxRecent)
|
if (tupgone &&
|
||||||
|
(tuple.t_data->t_infomask & HEAP_XMIN_INVALID) == 0 &&
|
||||||
|
tuple.t_data->t_xmax >= XmaxRecent)
|
||||||
{
|
{
|
||||||
tupgone = false;
|
tupgone = false;
|
||||||
nkeep++;
|
nkeep++;
|
||||||
|
@ -6,7 +6,7 @@
|
|||||||
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
|
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
|
||||||
* Portions Copyright (c) 1994, Regents of the University of California
|
* Portions Copyright (c) 1994, Regents of the University of California
|
||||||
*
|
*
|
||||||
* $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.185 2001/05/09 21:10:39 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.186 2001/05/18 21:24:19 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -232,6 +232,7 @@ transformStmt(ParseState *pstate, Node *parseTree)
|
|||||||
(SelectStmt *) parseTree);
|
(SelectStmt *) parseTree);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@ -1959,8 +1960,7 @@ transformSelectStmt(ParseState *pstate, SelectStmt *stmt)
|
|||||||
* The tree of set operations is converted into the setOperations field of
|
* The tree of set operations is converted into the setOperations field of
|
||||||
* the top-level Query.
|
* the top-level Query.
|
||||||
*/
|
*/
|
||||||
static Query *
|
static Query *transformSetOperationStmt(ParseState *pstate, SelectStmt *stmt)
|
||||||
transformSetOperationStmt(ParseState *pstate, SelectStmt *stmt)
|
|
||||||
{
|
{
|
||||||
Query *qry = makeNode(Query);
|
Query *qry = makeNode(Query);
|
||||||
SelectStmt *leftmostSelect;
|
SelectStmt *leftmostSelect;
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_clause.c,v 1.79 2001/03/22 06:16:16 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/parser/parse_clause.c,v 1.80 2001/05/18 21:24:19 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -843,7 +843,7 @@ findTargetlistEntry(ParseState *pstate, Node *node, List *tlist, int clause)
|
|||||||
* an expression.
|
* an expression.
|
||||||
*----------
|
*----------
|
||||||
*/
|
*/
|
||||||
if (IsA(node, Ident) &&((Ident *) node)->indirection == NIL)
|
if (IsA(node, Ident) && ((Ident *) node)->indirection == NIL)
|
||||||
{
|
{
|
||||||
char *name = ((Ident *) node)->name;
|
char *name = ((Ident *) node)->name;
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.92 2001/03/22 03:59:41 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.93 2001/05/18 21:24:19 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.102 2001/04/18 22:25:31 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.103 2001/05/18 21:24:19 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -287,7 +287,7 @@ ParseFuncOrColumn(ParseState *pstate, char *funcname, List *fargs,
|
|||||||
if (nargs == 1 && !must_be_agg)
|
if (nargs == 1 && !must_be_agg)
|
||||||
{
|
{
|
||||||
/* Is it a plain Relation name from the parser? */
|
/* Is it a plain Relation name from the parser? */
|
||||||
if (IsA(first_arg, Ident) &&((Ident *) first_arg)->isRel)
|
if (IsA(first_arg, Ident) && ((Ident *) first_arg)->isRel)
|
||||||
{
|
{
|
||||||
Ident *ident = (Ident *) first_arg;
|
Ident *ident = (Ident *) first_arg;
|
||||||
|
|
||||||
@ -347,7 +347,7 @@ ParseFuncOrColumn(ParseState *pstate, char *funcname, List *fargs,
|
|||||||
if (nargs != 1)
|
if (nargs != 1)
|
||||||
elog(ERROR, "Aggregate functions may only have one parameter");
|
elog(ERROR, "Aggregate functions may only have one parameter");
|
||||||
/* Agg's argument can't be a relation name, either */
|
/* Agg's argument can't be a relation name, either */
|
||||||
if (IsA(first_arg, Ident) &&((Ident *) first_arg)->isRel)
|
if (IsA(first_arg, Ident) && ((Ident *) first_arg)->isRel)
|
||||||
elog(ERROR, "Aggregate functions cannot be applied to relation names");
|
elog(ERROR, "Aggregate functions cannot be applied to relation names");
|
||||||
could_be_agg = true;
|
could_be_agg = true;
|
||||||
}
|
}
|
||||||
@ -355,7 +355,7 @@ ParseFuncOrColumn(ParseState *pstate, char *funcname, List *fargs,
|
|||||||
{
|
{
|
||||||
/* Try to parse as an aggregate if above-mentioned checks are OK */
|
/* Try to parse as an aggregate if above-mentioned checks are OK */
|
||||||
could_be_agg = (nargs == 1) &&
|
could_be_agg = (nargs == 1) &&
|
||||||
!(IsA(first_arg, Ident) &&((Ident *) first_arg)->isRel);
|
!(IsA(first_arg, Ident) && ((Ident *) first_arg)->isRel);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (could_be_agg)
|
if (could_be_agg)
|
||||||
@ -434,7 +434,7 @@ ParseFuncOrColumn(ParseState *pstate, char *funcname, List *fargs,
|
|||||||
{
|
{
|
||||||
Node *arg = lfirst(i);
|
Node *arg = lfirst(i);
|
||||||
|
|
||||||
if (IsA(arg, Ident) &&((Ident *) arg)->isRel)
|
if (IsA(arg, Ident) && ((Ident *) arg)->isRel)
|
||||||
{
|
{
|
||||||
RangeTblEntry *rte;
|
RangeTblEntry *rte;
|
||||||
int vnum;
|
int vnum;
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/sinval.c,v 1.30 2001/05/07 17:20:19 momjian Exp $
|
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/sinval.c,v 1.31 2001/05/18 21:24:20 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -235,7 +235,7 @@ TransactionIdIsInProgress(TransactionId xid)
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* GetXmaxRecent -- returns oldest transaction that was running
|
* GetXmaxRecent -- returns oldest transaction that was running
|
||||||
* when all current transaction was started.
|
* when all current transaction were started.
|
||||||
* It's used by vacuum to decide what deleted
|
* It's used by vacuum to decide what deleted
|
||||||
* tuples must be preserved in a table.
|
* tuples must be preserved in a table.
|
||||||
*/
|
*/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user