Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitdc0ff5c

Browse files
committed
Small code cleanups,formatting.
1 parent27b0e8c commitdc0ff5c

File tree

8 files changed

+33
-35
lines changed

8 files changed

+33
-35
lines changed

‎src/backend/access/nbtree/nbtree.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
* Portions Copyright (c) 1994, Regents of the University of California
1313
*
1414
* IDENTIFICATION
15-
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtree.c,v 1.80 2001/05/07 00:43:16 tgl Exp $
15+
* $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtree.c,v 1.81 2001/05/18 21:24:17 momjian Exp $
1616
*
1717
*-------------------------------------------------------------------------
1818
*/
@@ -57,10 +57,8 @@ btbuild(PG_FUNCTION_ARGS)
5757
Relationindex= (Relation)PG_GETARG_POINTER(1);
5858
IndexInfo*indexInfo= (IndexInfo*)PG_GETARG_POINTER(2);
5959
Node*oldPred= (Node*)PG_GETARG_POINTER(3);
60-
6160
#ifdefNOT_USED
6261
IndexStrategyistrat= (IndexStrategy)PG_GETARG_POINTER(4);
63-
6462
#endif
6563
HeapScanDeschscan;
6664
HeapTuplehtup;
@@ -72,11 +70,9 @@ btbuild(PG_FUNCTION_ARGS)
7270
doublenhtups,
7371
nitups;
7472
Node*pred=indexInfo->ii_Predicate;
75-
7673
#ifndefOMIT_PARTIAL_INDEX
7774
TupleTabletupleTable;
7875
TupleTableSlot*slot;
79-
8076
#endif
8177
ExprContext*econtext;
8278
InsertIndexResultres=NULL;

‎src/backend/commands/define.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
*
1111
*
1212
* IDENTIFICATION
13-
* $Header: /cvsroot/pgsql/src/backend/commands/define.c,v 1.54 2001/03/22 06:16:11 momjian Exp $
13+
* $Header: /cvsroot/pgsql/src/backend/commands/define.c,v 1.55 2001/05/18 21:24:18 momjian Exp $
1414
*
1515
* DESCRIPTION
1616
* The "DefineFoo" routines take the parse tree and pick out the
@@ -384,15 +384,15 @@ DefineOperator(char *oprName,
384384
if (strcasecmp(defel->defname,"leftarg")==0)
385385
{
386386
typeName1=defGetString(defel);
387-
if (IsA(defel->arg,TypeName)
388-
&&((TypeName*)defel->arg)->setof)
387+
if (IsA(defel->arg,TypeName)&&
388+
((TypeName*)defel->arg)->setof)
389389
elog(ERROR,"setof type not implemented for leftarg");
390390
}
391391
elseif (strcasecmp(defel->defname,"rightarg")==0)
392392
{
393393
typeName2=defGetString(defel);
394-
if (IsA(defel->arg,TypeName)
395-
&&((TypeName*)defel->arg)->setof)
394+
if (IsA(defel->arg,TypeName)&&
395+
((TypeName*)defel->arg)->setof)
396396
elog(ERROR,"setof type not implemented for rightarg");
397397
}
398398
elseif (strcasecmp(defel->defname,"procedure")==0)

‎src/backend/commands/vacuum.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.192 2001/05/17 15:55:24 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.193 2001/05/18 21:24:18 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -836,7 +836,9 @@ scan_heap(VRelStats *vacrelstats, Relation onerel,
836836
* If tuple is recently deleted then we must not remove it
837837
* from relation.
838838
*/
839-
if (tupgone&& (tuple.t_data->t_infomask&HEAP_XMIN_INVALID)==0&&tuple.t_data->t_xmax >=XmaxRecent)
839+
if (tupgone&&
840+
(tuple.t_data->t_infomask&HEAP_XMIN_INVALID)==0&&
841+
tuple.t_data->t_xmax >=XmaxRecent)
840842
{
841843
tupgone= false;
842844
nkeep++;

‎src/backend/parser/analyze.c

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
77
* Portions Copyright (c) 1994, Regents of the University of California
88
*
9-
*$Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.185 2001/05/09 21:10:39 momjian Exp $
9+
*$Header: /cvsroot/pgsql/src/backend/parser/analyze.c,v 1.186 2001/05/18 21:24:19 momjian Exp $
1010
*
1111
*-------------------------------------------------------------------------
1212
*/
@@ -232,6 +232,7 @@ transformStmt(ParseState *pstate, Node *parseTree)
232232
(SelectStmt*)parseTree);
233233
break;
234234

235+
235236
default:
236237

237238
/*
@@ -1224,7 +1225,7 @@ transformCreateStmt(ParseState *pstate, CreateStmt *stmt)
12241225
break;
12251226
}
12261227
}
1227-
if (!found)
1228+
if (!found)
12281229
break;
12291230
}
12301231
if (!found)
@@ -1261,16 +1262,16 @@ transformCreateStmt(ParseState *pstate, CreateStmt *stmt)
12611262
pkattr->isRel= false;
12621263
fkconstraint->pk_attrs=lappend(fkconstraint->pk_attrs,pkattr);
12631264
foreach (findattr,stmt->tableElts) {
1264-
col=lfirst(findattr);
1265-
if (strcmp(col->colname,ielem->name)==0) {
1265+
col=lfirst(findattr);
1266+
if (strcmp(col->colname,ielem->name)==0) {
12661267
char*buff=TypeNameToInternalName(col->typename);
12671268
Oidtype=typenameTypeId(buff);
1268-
if (!OidIsValid(type)) {
1269-
elog(ERROR,"Unable to lookup type %s",col->typename->name);
1270-
}
1271-
pktypoid[attnum++]=type;/* need to convert typename */
1272-
break;
1273-
}
1269+
if (!OidIsValid(type)) {
1270+
elog(ERROR,"Unable to lookup type %s",col->typename->name);
1271+
}
1272+
pktypoid[attnum++]=type;/* need to convert typename */
1273+
break;
1274+
}
12741275
}
12751276
}
12761277
}
@@ -1959,8 +1960,7 @@ transformSelectStmt(ParseState *pstate, SelectStmt *stmt)
19591960
* The tree of set operations is converted into the setOperations field of
19601961
* the top-level Query.
19611962
*/
1962-
staticQuery*
1963-
transformSetOperationStmt(ParseState*pstate,SelectStmt*stmt)
1963+
staticQuery*transformSetOperationStmt(ParseState*pstate,SelectStmt*stmt)
19641964
{
19651965
Query*qry=makeNode(Query);
19661966
SelectStmt*leftmostSelect;

‎src/backend/parser/parse_clause.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/parser/parse_clause.c,v 1.79 2001/03/22 06:16:16 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/parser/parse_clause.c,v 1.80 2001/05/18 21:24:19 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -843,7 +843,7 @@ findTargetlistEntry(ParseState *pstate, Node *node, List *tlist, int clause)
843843
* an expression.
844844
*----------
845845
*/
846-
if (IsA(node,Ident)&&((Ident*)node)->indirection==NIL)
846+
if (IsA(node,Ident)&&((Ident*)node)->indirection==NIL)
847847
{
848848
char*name= ((Ident*)node)->name;
849849

‎src/backend/parser/parse_expr.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.92 2001/03/22 03:59:41 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.93 2001/05/18 21:24:19 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -573,7 +573,7 @@ transformIdent(ParseState *pstate, Ident *ident, int precedence)
573573
* appear
574574
*/
575575
if (ident->indirection==NIL&&
576-
refnameRangeOrJoinEntry(pstate,ident->name,&sublevels_up)!=NULL)
576+
refnameRangeOrJoinEntry(pstate,ident->name,&sublevels_up)!=NULL)
577577
{
578578
ident->isRel= TRUE;
579579
result= (Node*)ident;

‎src/backend/parser/parse_func.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.102 2001/04/1822:25:31 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.103 2001/05/1821:24:19 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -287,7 +287,7 @@ ParseFuncOrColumn(ParseState *pstate, char *funcname, List *fargs,
287287
if (nargs==1&& !must_be_agg)
288288
{
289289
/* Is it a plain Relation name from the parser? */
290-
if (IsA(first_arg,Ident)&&((Ident*)first_arg)->isRel)
290+
if (IsA(first_arg,Ident)&&((Ident*)first_arg)->isRel)
291291
{
292292
Ident*ident= (Ident*)first_arg;
293293

@@ -347,15 +347,15 @@ ParseFuncOrColumn(ParseState *pstate, char *funcname, List *fargs,
347347
if (nargs!=1)
348348
elog(ERROR,"Aggregate functions may only have one parameter");
349349
/* Agg's argument can't be a relation name, either */
350-
if (IsA(first_arg,Ident)&&((Ident*)first_arg)->isRel)
350+
if (IsA(first_arg,Ident)&&((Ident*)first_arg)->isRel)
351351
elog(ERROR,"Aggregate functions cannot be applied to relation names");
352352
could_be_agg= true;
353353
}
354354
else
355355
{
356356
/* Try to parse as an aggregate if above-mentioned checks are OK */
357357
could_be_agg= (nargs==1)&&
358-
!(IsA(first_arg,Ident)&&((Ident*)first_arg)->isRel);
358+
!(IsA(first_arg,Ident)&&((Ident*)first_arg)->isRel);
359359
}
360360

361361
if (could_be_agg)
@@ -434,7 +434,7 @@ ParseFuncOrColumn(ParseState *pstate, char *funcname, List *fargs,
434434
{
435435
Node*arg=lfirst(i);
436436

437-
if (IsA(arg,Ident)&&((Ident*)arg)->isRel)
437+
if (IsA(arg,Ident)&&((Ident*)arg)->isRel)
438438
{
439439
RangeTblEntry*rte;
440440
intvnum;

‎src/backend/storage/ipc/sinval.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/sinval.c,v 1.30 2001/05/07 17:20:19 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/sinval.c,v 1.31 2001/05/18 21:24:20 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -235,7 +235,7 @@ TransactionIdIsInProgress(TransactionId xid)
235235

236236
/*
237237
* GetXmaxRecent -- returns oldest transaction that was running
238-
*when all current transactionwas started.
238+
*when all current transactionwere started.
239239
*It's used by vacuum to decide what deleted
240240
*tuples must be preserved in a table.
241241
*/

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp