From 9322950aa44ef3647ccdd043cffe92cead171587 Mon Sep 17 00:00:00 2001 From: Bruce Momjian Date: Wed, 3 Feb 1999 21:18:02 +0000 Subject: [PATCH] Cleanup of source files where 'return' or 'var =' is alone on a line. --- src/backend/access/common/heaptuple.c | 5 +- src/backend/access/common/tupdesc.c | 8 +-- src/backend/access/hash/hash.c | 5 +- src/backend/access/hash/hashovfl.c | 11 ++- src/backend/access/index/istrat.c | 5 +- src/backend/access/nbtree/nbtinsert.c | 5 +- src/backend/access/nbtree/nbtsort.c | 17 ++--- src/backend/access/nbtree/nbtutils.c | 5 +- src/backend/access/rtree/rtscan.c | 5 +- src/backend/access/transam/transam.c | 11 ++- src/backend/access/transam/transsup.c | 5 +- src/backend/access/transam/xact.c | 14 ++-- src/backend/bootstrap/bootstrap.c | 5 +- src/backend/catalog/heap.c | 5 +- src/backend/catalog/index.c | 8 +-- src/backend/catalog/pg_aggregate.c | 44 +++++------- src/backend/catalog/pg_operator.c | 23 +++---- src/backend/catalog/pg_type.c | 11 ++- src/backend/commands/cluster.c | 17 ++--- src/backend/commands/command.c | 5 +- src/backend/commands/copy.c | 20 ++---- src/backend/commands/creatinh.c | 11 ++- src/backend/commands/defind.c | 14 ++-- src/backend/commands/trigger.c | 15 ++--- src/backend/commands/vacuum.c | 5 +- src/backend/commands/view.c | 20 ++---- src/backend/executor/execJunk.c | 5 +- src/backend/executor/execQual.c | 11 ++- src/backend/executor/execTuples.c | 5 +- src/backend/executor/execUtils.c | 5 +- src/backend/executor/functions.c | 8 +-- src/backend/executor/nodeAppend.c | 8 +-- src/backend/executor/nodeHash.c | 8 +-- src/backend/executor/nodeHashjoin.c | 14 ++-- src/backend/executor/nodeIndexscan.c | 5 +- src/backend/executor/nodeMaterial.c | 5 +- src/backend/executor/nodeMergejoin.c | 4 +- src/backend/libpq/portalbuf.c | 8 +-- src/backend/nodes/copyfuncs.c | 5 +- src/backend/nodes/readfuncs.c | 26 +++----- src/backend/optimizer/geqo/geqo_eval.c | 20 ++---- src/backend/optimizer/geqo/geqo_main.c | 5 +- src/backend/optimizer/geqo/geqo_params.c | 5 +- src/backend/optimizer/geqo/geqo_pool.c | 5 +- src/backend/optimizer/geqo/geqo_selection.c | 5 +- src/backend/optimizer/path/clausesel.c | 5 +- src/backend/optimizer/path/hashutils.c | 11 ++- src/backend/optimizer/path/indxpath.c | 29 +++----- src/backend/optimizer/path/joinpath.c | 74 +++++++-------------- src/backend/optimizer/path/joinrels.c | 29 +++----- src/backend/optimizer/path/joinutils.c | 17 ++--- src/backend/optimizer/path/mergeutils.c | 8 +-- src/backend/optimizer/path/orindxpath.c | 8 +-- src/backend/optimizer/path/predmig.c | 14 ++-- src/backend/optimizer/path/xfunc.c | 20 ++---- src/backend/optimizer/plan/createplan.c | 41 ++++-------- src/backend/optimizer/plan/initsplan.c | 11 ++- src/backend/optimizer/plan/planner.c | 8 +-- src/backend/optimizer/plan/setrefs.c | 32 +++------ src/backend/optimizer/plan/subselect.c | 15 ++--- src/backend/optimizer/prep/prepqual.c | 8 +-- src/backend/optimizer/prep/preptlist.c | 11 ++- src/backend/optimizer/prep/prepunion.c | 8 +-- src/backend/optimizer/util/clauseinfo.c | 5 +- src/backend/optimizer/util/clauses.c | 20 ++---- src/backend/optimizer/util/ordering.c | 11 ++- src/backend/optimizer/util/pathnode.c | 44 +++++------- src/backend/optimizer/util/plancat.c | 5 +- src/backend/optimizer/util/tlist.c | 8 +-- src/backend/parser/parse_expr.c | 20 ++---- src/backend/parser/parse_func.c | 23 +++---- src/backend/parser/parse_target.c | 5 +- src/backend/port/snprintf.c | 5 +- src/backend/rewrite/rewriteHandler.c | 8 +-- src/backend/rewrite/rewriteManip.c | 8 +-- src/backend/rewrite/rewriteSupport.c | 5 +- src/backend/storage/buffer/bufmgr.c | 5 +- src/backend/storage/buffer/localbuf.c | 5 +- src/backend/storage/file/fd.c | 17 ++--- src/backend/storage/ipc/shmem.c | 8 +-- src/backend/storage/large_object/inv_api.c | 8 +-- src/backend/utils/adt/acl.c | 11 ++- src/backend/utils/adt/arrayfuncs.c | 5 +- src/backend/utils/adt/inet_net_pton.c | 3 +- src/backend/utils/adt/regexp.c | 5 +- src/backend/utils/cache/catcache.c | 8 +-- src/backend/utils/cache/fcache.c | 5 +- src/backend/utils/cache/inval.c | 4 +- src/backend/utils/cache/lsyscache.c | 5 +- src/backend/utils/cache/relcache.c | 26 +++----- src/backend/utils/cache/syscache.c | 14 ++-- src/backend/utils/fmgr/fmgr.c | 8 +-- src/backend/utils/hash/dynahash.c | 8 +-- src/backend/utils/mmgr/portalmem.c | 5 +- src/backend/utils/sort/psort.c | 14 ++-- src/bin/psql/psql.c | 5 +- src/interfaces/ecpg/preproc/type.c | 3 +- src/interfaces/libpq/fe-print.c | 8 +-- src/interfaces/odbc/setup.c | 3 +- src/pl/plpgsql/src/pl_exec.c | 5 +- src/test/regress/regress.c | 5 +- 101 files changed, 422 insertions(+), 743 deletions(-) diff --git a/src/backend/access/common/heaptuple.c b/src/backend/access/common/heaptuple.c index 4cf0098f5e..9e16cabd37 100644 --- a/src/backend/access/common/heaptuple.c +++ b/src/backend/access/common/heaptuple.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.47 1999/01/24 22:53:25 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.48 1999/02/03 21:15:27 momjian Exp $ * * NOTES * The old interface functions have been converted to macros @@ -759,8 +759,7 @@ heap_modifytuple(HeapTuple tuple, if (repl[attoff] == ' ') { - value[attoff] = - heap_getattr(tuple, + value[attoff] = heap_getattr(tuple, AttrOffsetGetAttrNumber(attoff), RelationGetDescr(relation), &isNull); diff --git a/src/backend/access/common/tupdesc.c b/src/backend/access/common/tupdesc.c index 41f2869c46..7dd94dd883 100644 --- a/src/backend/access/common/tupdesc.c +++ b/src/backend/access/common/tupdesc.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.46 1998/12/14 05:18:30 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.47 1999/02/03 21:15:27 momjian Exp $ * * NOTES * some of the executor utility code such as "ExecTypeFromTL" should be @@ -115,8 +115,7 @@ CreateTupleDescCopy(TupleDesc tupdesc) desc->attrs = (Form_pg_attribute *) palloc(size); for (i = 0; i < desc->natts; i++) { - desc->attrs[i] = - (Form_pg_attribute) palloc(ATTRIBUTE_TUPLE_SIZE); + desc->attrs[i] = (Form_pg_attribute) palloc(ATTRIBUTE_TUPLE_SIZE); memmove(desc->attrs[i], tupdesc->attrs[i], ATTRIBUTE_TUPLE_SIZE); @@ -150,8 +149,7 @@ CreateTupleDescCopyConstr(TupleDesc tupdesc) desc->attrs = (Form_pg_attribute *) palloc(size); for (i = 0; i < desc->natts; i++) { - desc->attrs[i] = - (Form_pg_attribute) palloc(ATTRIBUTE_TUPLE_SIZE); + desc->attrs[i] = (Form_pg_attribute) palloc(ATTRIBUTE_TUPLE_SIZE); memmove(desc->attrs[i], tupdesc->attrs[i], ATTRIBUTE_TUPLE_SIZE); diff --git a/src/backend/access/hash/hash.c b/src/backend/access/hash/hash.c index 07bc0feec9..1554af876b 100644 --- a/src/backend/access/hash/hash.c +++ b/src/backend/access/hash/hash.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/access/hash/hash.c,v 1.23 1998/11/27 19:51:31 vadim Exp $ + * $Header: /cvsroot/pgsql/src/backend/access/hash/hash.c,v 1.24 1999/02/03 21:15:28 momjian Exp $ * * NOTES * This file contains only the public interface routines. @@ -485,8 +485,7 @@ hashrestrpos(IndexScanDesc scan) /* bump lock on currentMarkData and copy to currentItemData */ if (ItemPointerIsValid(&(scan->currentMarkData))) { - so->hashso_curbuf = - _hash_getbuf(scan->relation, + so->hashso_curbuf =_hash_getbuf(scan->relation, BufferGetBlockNumber(so->hashso_mrkbuf), HASH_READ); diff --git a/src/backend/access/hash/hashovfl.c b/src/backend/access/hash/hashovfl.c index c0800f4cf5..b6a847a10a 100644 --- a/src/backend/access/hash/hashovfl.c +++ b/src/backend/access/hash/hashovfl.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/access/hash/hashovfl.c,v 1.18 1998/10/04 20:19:08 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/access/hash/hashovfl.c,v 1.19 1999/02/03 21:15:28 momjian Exp $ * * NOTES * Overflow pages look like ordinary relation pages. @@ -336,8 +336,7 @@ _hash_freeovflpage(Relation rel, Buffer ovflbuf) { Buffer prevbuf = _hash_getbuf(rel, prevblkno, HASH_WRITE); Page prevpage = BufferGetPage(prevbuf); - HashPageOpaque prevopaque = - (HashPageOpaque) PageGetSpecialPointer(prevpage); + HashPageOpaque prevopaque = (HashPageOpaque) PageGetSpecialPointer(prevpage); _hash_checkpage(prevpage, LH_BUCKET_PAGE | LH_OVERFLOW_PAGE); Assert(prevopaque->hasho_bucket == bucket); @@ -348,8 +347,7 @@ _hash_freeovflpage(Relation rel, Buffer ovflbuf) { Buffer nextbuf = _hash_getbuf(rel, nextblkno, HASH_WRITE); Page nextpage = BufferGetPage(nextbuf); - HashPageOpaque nextopaque = - (HashPageOpaque) PageGetSpecialPointer(nextpage); + HashPageOpaque nextopaque = (HashPageOpaque) PageGetSpecialPointer(nextpage); _hash_checkpage(nextpage, LH_OVERFLOW_PAGE); Assert(nextopaque->hasho_bucket == bucket); @@ -363,8 +361,7 @@ _hash_freeovflpage(Relation rel, Buffer ovflbuf) * element hashm_mapp[bitmappage]. */ splitnum = (addr >> SPLITSHIFT); - ovflpgno = - (splitnum ? metap->SPARES[splitnum - 1] : 0) + (addr & SPLITMASK) - 1; + ovflpgno = (splitnum ? metap->SPARES[splitnum - 1] : 0) + (addr & SPLITMASK) - 1; if (ovflpgno < metap->LAST_FREED) metap->LAST_FREED = ovflpgno; diff --git a/src/backend/access/index/istrat.c b/src/backend/access/index/istrat.c index ca4f6eeaeb..c5753e77f7 100644 --- a/src/backend/access/index/istrat.c +++ b/src/backend/access/index/istrat.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/access/index/Attic/istrat.c,v 1.29 1998/09/23 04:21:57 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/access/index/Attic/istrat.c,v 1.30 1999/02/03 21:15:30 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -293,8 +293,7 @@ RelationGetStrategy(Relation relation, Assert(StrategyEvaluationIsValid(evaluation)); Assert(RegProcedureIsValid(procedure)); - strategyMap = - IndexStrategyGetStrategyMap(RelationGetIndexStrategy(relation), + strategyMap = IndexStrategyGetStrategyMap(RelationGetIndexStrategy(relation), evaluation->maxStrategy, attributeNumber); diff --git a/src/backend/access/nbtree/nbtinsert.c b/src/backend/access/nbtree/nbtinsert.c index 01109f564f..240c902dbe 100644 --- a/src/backend/access/nbtree/nbtinsert.c +++ b/src/backend/access/nbtree/nbtinsert.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.33 1999/01/29 09:22:52 vadim Exp $ + * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.34 1999/02/03 21:15:32 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -1200,8 +1200,7 @@ _bt_pgaddtup(Relation rel, do { - chkitem = - (BTItem) PageGetItem(page, PageGetItemId(page, itup_off)); + chkitem = (BTItem) PageGetItem(page, PageGetItemId(page, itup_off)); itup_off = OffsetNumberNext(itup_off); } while (!BTItemSame(chkitem, afteritem)); } diff --git a/src/backend/access/nbtree/nbtsort.c b/src/backend/access/nbtree/nbtsort.c index 10dc7701c0..5e2589f9ee 100644 --- a/src/backend/access/nbtree/nbtsort.c +++ b/src/backend/access/nbtree/nbtsort.c @@ -5,7 +5,7 @@ * * * IDENTIFICATION - * $Id: nbtsort.c,v 1.34 1999/01/17 06:18:12 momjian Exp $ + * $Id: nbtsort.c,v 1.35 1999/02/03 21:15:36 momjian Exp $ * * NOTES * @@ -559,20 +559,16 @@ _bt_spoolinit(Relation index, int ntapes, bool isunique) btspool->bts_tape = 0; btspool->isunique = isunique; - btspool->bts_itape = - (BTTapeBlock **) palloc(sizeof(BTTapeBlock *) * ntapes); - btspool->bts_otape = - (BTTapeBlock **) palloc(sizeof(BTTapeBlock *) * ntapes); + btspool->bts_itape =(BTTapeBlock **) palloc(sizeof(BTTapeBlock *) * ntapes); + btspool->bts_otape =(BTTapeBlock **) palloc(sizeof(BTTapeBlock *) * ntapes); if (btspool->bts_itape == (BTTapeBlock **) NULL || btspool->bts_otape == (BTTapeBlock **) NULL) elog(ERROR, "_bt_spoolinit: out of memory"); for (i = 0; i < ntapes; ++i) { - btspool->bts_itape[i] = - _bt_tapecreate(mktemp(strcpy(fname, TAPETEMP))); - btspool->bts_otape[i] = - _bt_tapecreate(mktemp(strcpy(fname, TAPETEMP))); + btspool->bts_itape[i] = _bt_tapecreate(mktemp(strcpy(fname, TAPETEMP))); + btspool->bts_otape[i] = _bt_tapecreate(mktemp(strcpy(fname, TAPETEMP))); } pfree((void *) fname); @@ -698,8 +694,7 @@ _bt_spool(Relation index, BTItem btitem, void *spool) */ if (it_ntup > 0) { - parray = - (BTSortKey *) palloc(it_ntup * sizeof(BTSortKey)); + parray = (BTSortKey *) palloc(it_ntup * sizeof(BTSortKey)); pos = itape->bttb_data; for (i = 0; i < it_ntup; ++i) _bt_setsortkey(index, _bt_tapenext(itape, &pos), &(parray[i])); diff --git a/src/backend/access/nbtree/nbtutils.c b/src/backend/access/nbtree/nbtutils.c index bffdf53dc0..7a2ce71af0 100644 --- a/src/backend/access/nbtree/nbtutils.c +++ b/src/backend/access/nbtree/nbtutils.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtutils.c,v 1.23 1998/09/07 05:35:34 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtutils.c,v 1.24 1999/02/03 21:15:36 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -258,8 +258,7 @@ _bt_orderkeys(Relation relation, BTScanOpaque so) if (init[j]) { /* yup, use the appropriate value */ - test = - (long) FMGR_PTR2(&cur->sk_func, cur->sk_argument, xform[j].sk_argument); + test = (long) FMGR_PTR2(&cur->sk_func, cur->sk_argument, xform[j].sk_argument); if (test) xform[j].sk_argument = cur->sk_argument; else if (j == (BTEqualStrategyNumber - 1)) diff --git a/src/backend/access/rtree/rtscan.c b/src/backend/access/rtree/rtscan.c index f2c7927d27..1556527c91 100644 --- a/src/backend/access/rtree/rtscan.c +++ b/src/backend/access/rtree/rtscan.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtscan.c,v 1.20 1998/12/15 12:45:29 vadim Exp $ + * $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtscan.c,v 1.21 1999/02/03 21:15:37 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -141,8 +141,7 @@ rtrescan(IndexScanDesc s, bool fromEnd, ScanKey key) s->opaque = p; if (s->numberOfKeys > 0) { - p->s_internalKey = - (ScanKey) palloc(sizeof(ScanKeyData) * s->numberOfKeys); + p->s_internalKey = (ScanKey) palloc(sizeof(ScanKeyData) * s->numberOfKeys); /* * Scans on internal pages use different operators than they diff --git a/src/backend/access/transam/transam.c b/src/backend/access/transam/transam.c index 478afbbcca..b800a0e08a 100644 --- a/src/backend/access/transam/transam.c +++ b/src/backend/access/transam/transam.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/access/transam/transam.c,v 1.21 1998/12/16 11:53:44 vadim Exp $ + * $Header: /cvsroot/pgsql/src/backend/access/transam/transam.c,v 1.22 1999/02/03 21:15:41 momjian Exp $ * * NOTES * This file contains the high level access-method interface to the @@ -497,8 +497,7 @@ TransactionIdDidCommit(TransactionId transactionId) if (AMI_OVERRIDE) return true; - return - TransactionLogTest(transactionId, XID_COMMIT); + return TransactionLogTest(transactionId, XID_COMMIT); } /* @@ -515,8 +514,7 @@ TransactionIdDidAbort(TransactionId transactionId) if (AMI_OVERRIDE) return false; - return - TransactionLogTest(transactionId, XID_ABORT); + return TransactionLogTest(transactionId, XID_ABORT); } /* @@ -532,8 +530,7 @@ TransactionIdIsInProgress(TransactionId transactionId) if (AMI_OVERRIDE) return false; - return - TransactionLogTest(transactionId, XID_INPROGRESS); + return TransactionLogTest(transactionId, XID_INPROGRESS); } */ diff --git a/src/backend/access/transam/transsup.c b/src/backend/access/transam/transsup.c index edf953384f..93be4917cd 100644 --- a/src/backend/access/transam/transsup.c +++ b/src/backend/access/transam/transsup.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/access/transam/Attic/transsup.c,v 1.18 1998/12/15 12:45:33 vadim Exp $ + * $Header: /cvsroot/pgsql/src/backend/access/transam/Attic/transsup.c,v 1.19 1999/02/03 21:15:45 momjian Exp $ * * NOTES * This file contains support functions for the high @@ -315,8 +315,7 @@ TransBlockNumberGetXidStatus(Relation relation, LockBuffer(buffer, BUFFER_LOCK_UNLOCK); ReleaseBuffer(buffer); - return - xstatus; + return xstatus; } /* -------------------------------- diff --git a/src/backend/access/transam/xact.c b/src/backend/access/transam/xact.c index 1fba777995..1e61f90567 100644 --- a/src/backend/access/transam/xact.c +++ b/src/backend/access/transam/xact.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.30 1999/02/02 03:44:00 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.31 1999/02/03 21:15:45 momjian Exp $ * * NOTES * Transaction aborts can now occur two ways: @@ -191,8 +191,7 @@ TransactionStateData CurrentTransactionStateData = { TBLOCK_DEFAULT /* transaction block state */ }; -TransactionState CurrentTransactionState = -&CurrentTransactionStateData; +TransactionState CurrentTransactionState = &CurrentTransactionStateData; int DefaultXactIsoLevel = XACT_READ_COMMITTED; int XactIsoLevel; @@ -467,8 +466,7 @@ CommandIdIsCurrentCommandId(CommandId cid) if (AMI_OVERRIDE) return false; - return - (cid == s->commandId) ? true : false; + return (cid == s->commandId) ? true : false; } bool @@ -479,8 +477,7 @@ CommandIdGEScanCommandId(CommandId cid) if (AMI_OVERRIDE) return false; - return - (cid >= s->scanCommandId) ? true : false; + return (cid >= s->scanCommandId) ? true : false; } @@ -511,8 +508,7 @@ CommandCounterIncrement() elog(ERROR, "You may only have 2^32-1 commands per transaction"); } - CurrentTransactionStateData.scanCommandId = - CurrentTransactionStateData.commandId; + CurrentTransactionStateData.scanCommandId = CurrentTransactionStateData.commandId; /* make cache changes visible to me */ AtCommit_Cache(); diff --git a/src/backend/bootstrap/bootstrap.c b/src/backend/bootstrap/bootstrap.c index ff1c5afc10..4e6675bbba 100644 --- a/src/backend/bootstrap/bootstrap.c +++ b/src/backend/bootstrap/bootstrap.c @@ -7,7 +7,7 @@ * Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.53 1999/01/17 06:18:14 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.54 1999/02/03 21:15:46 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -855,8 +855,7 @@ gettype(char *type) static Form_pg_attribute /* XXX */ AllocateAttribute() { - Form_pg_attribute attribute = - (Form_pg_attribute) malloc(ATTRIBUTE_TUPLE_SIZE); + Form_pg_attribute attribute = (Form_pg_attribute) malloc(ATTRIBUTE_TUPLE_SIZE); if (!PointerIsValid(attribute)) elog(FATAL, "AllocateAttribute: malloc failed"); diff --git a/src/backend/catalog/heap.c b/src/backend/catalog/heap.c index eef7dbea0c..2b20186d2f 100644 --- a/src/backend/catalog/heap.c +++ b/src/backend/catalog/heap.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.71 1999/02/02 03:44:08 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.72 1999/02/03 21:15:54 momjian Exp $ * * * INTERFACE ROUTINES @@ -130,8 +130,7 @@ static FormData_pg_attribute a6 = { MaxCommandIdAttributeNumber, 0, -1, -1, '\001', '\0', 'i', '\0', '\0' }; -static Form_pg_attribute HeapAtt[] = -{&a1, &a2, &a3, &a4, &a5, &a6}; +static Form_pg_attribute HeapAtt[] = {&a1, &a2, &a3, &a4, &a5, &a6}; /* ---------------------------------------------------------------- * XXX END OF UGLY HARD CODED BADNESS XXX diff --git a/src/backend/catalog/index.c b/src/backend/catalog/index.c index 800dc2c3f9..2aee180dd4 100644 --- a/src/backend/catalog/index.c +++ b/src/backend/catalog/index.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.68 1999/02/02 03:44:13 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.69 1999/02/03 21:15:54 momjian Exp $ * * * INTERFACE ROUTINES @@ -436,8 +436,7 @@ ConstructIndexReldesc(Relation indexRelation, Oid amoid) oldcxt = MemoryContextSwitchTo((MemoryContext) CacheCxt); - indexRelation->rd_am = - AccessMethodObjectIdGetForm(amoid); + indexRelation->rd_am = AccessMethodObjectIdGetForm(amoid); MemoryContextSwitchTo(oldcxt); @@ -802,8 +801,7 @@ UpdateIndexPredicate(Oid indexoid, Node *oldPred, Node *predicate) newPred = NULL; if (predicate != NULL) { - newPred = - (Node *) make_orclause(lcons(make_andclause((List *) predicate), + newPred = (Node *) make_orclause(lcons(make_andclause((List *) predicate), lcons(make_andclause((List *) oldPred), NIL))); newPred = (Node *) cnfify((Expr *) newPred, true); diff --git a/src/backend/catalog/pg_aggregate.c b/src/backend/catalog/pg_aggregate.c index 4dba8740ee..dc15786b1a 100644 --- a/src/backend/catalog/pg_aggregate.c +++ b/src/backend/catalog/pg_aggregate.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/catalog/pg_aggregate.c,v 1.18 1998/11/27 19:51:50 vadim Exp $ + * $Header: /cvsroot/pgsql/src/backend/catalog/pg_aggregate.c,v 1.19 1999/02/03 21:15:56 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -206,43 +206,29 @@ AggregateCreate(char *aggName, } namestrcpy(&aname, aggName); values[Anum_pg_aggregate_aggname - 1] = NameGetDatum(&aname); - values[Anum_pg_aggregate_aggowner - 1] = - Int32GetDatum(GetUserId()); - values[Anum_pg_aggregate_aggtransfn1 - 1] = - ObjectIdGetDatum(xfn1); - values[Anum_pg_aggregate_aggtransfn2 - 1] = - ObjectIdGetDatum(xfn2); - values[Anum_pg_aggregate_aggfinalfn - 1] = - ObjectIdGetDatum(ffn); + values[Anum_pg_aggregate_aggowner - 1] = Int32GetDatum(GetUserId()); + values[Anum_pg_aggregate_aggtransfn1 - 1] = ObjectIdGetDatum(xfn1); + values[Anum_pg_aggregate_aggtransfn2 - 1] = ObjectIdGetDatum(xfn2); + values[Anum_pg_aggregate_aggfinalfn - 1] = ObjectIdGetDatum(ffn); - values[Anum_pg_aggregate_aggbasetype - 1] = - ObjectIdGetDatum(xbase); + values[Anum_pg_aggregate_aggbasetype - 1] = ObjectIdGetDatum(xbase); if (!OidIsValid(xfn1)) { - values[Anum_pg_aggregate_aggtranstype1 - 1] = - ObjectIdGetDatum(InvalidOid); - values[Anum_pg_aggregate_aggtranstype2 - 1] = - ObjectIdGetDatum(xret2); - values[Anum_pg_aggregate_aggfinaltype - 1] = - ObjectIdGetDatum(xret2); + values[Anum_pg_aggregate_aggtranstype1 - 1] = ObjectIdGetDatum(InvalidOid); + values[Anum_pg_aggregate_aggtranstype2 - 1] = ObjectIdGetDatum(xret2); + values[Anum_pg_aggregate_aggfinaltype - 1] = ObjectIdGetDatum(xret2); } else if (!OidIsValid(xfn2)) { - values[Anum_pg_aggregate_aggtranstype1 - 1] = - ObjectIdGetDatum(xret1); - values[Anum_pg_aggregate_aggtranstype2 - 1] = - ObjectIdGetDatum(InvalidOid); - values[Anum_pg_aggregate_aggfinaltype - 1] = - ObjectIdGetDatum(xret1); + values[Anum_pg_aggregate_aggtranstype1 - 1] = ObjectIdGetDatum(xret1); + values[Anum_pg_aggregate_aggtranstype2 - 1] = ObjectIdGetDatum(InvalidOid); + values[Anum_pg_aggregate_aggfinaltype - 1] = ObjectIdGetDatum(xret1); } else { - values[Anum_pg_aggregate_aggtranstype1 - 1] = - ObjectIdGetDatum(xret1); - values[Anum_pg_aggregate_aggtranstype2 - 1] = - ObjectIdGetDatum(xret2); - values[Anum_pg_aggregate_aggfinaltype - 1] = - ObjectIdGetDatum(fret); + values[Anum_pg_aggregate_aggtranstype1 - 1] = ObjectIdGetDatum(xret1); + values[Anum_pg_aggregate_aggtranstype2 - 1] = ObjectIdGetDatum(xret2); + values[Anum_pg_aggregate_aggfinaltype - 1] = ObjectIdGetDatum(fret); } if (agginitval1) diff --git a/src/backend/catalog/pg_operator.c b/src/backend/catalog/pg_operator.c index 40a33fd5b5..c24892946e 100644 --- a/src/backend/catalog/pg_operator.c +++ b/src/backend/catalog/pg_operator.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/catalog/pg_operator.c,v 1.31 1998/12/15 12:45:45 vadim Exp $ + * $Header: /cvsroot/pgsql/src/backend/catalog/pg_operator.c,v 1.32 1999/02/03 21:15:56 momjian Exp $ * * NOTES * these routines moved here from commands/define.c and somewhat cleaned up. @@ -205,8 +205,7 @@ OperatorGet(char *operatorName, */ heap_close(pg_operator_desc); - return - operatorObjectId; + return operatorObjectId; } /* ---------------------------------------------------------------- @@ -287,8 +286,7 @@ OperatorShellMakeWithOpenRelation(Relation pg_operator_desc, */ pfree(tup); - return - operatorObjectId; + return operatorObjectId; } /* ---------------------------------------------------------------- @@ -338,8 +336,7 @@ OperatorShellMake(char *operatorName, * and recover the shell tuple's oid. * ---------------- */ - operatorObjectId = - OperatorShellMakeWithOpenRelation(pg_operator_desc, + operatorObjectId = OperatorShellMakeWithOpenRelation(pg_operator_desc, operatorName, leftObjectId, rightObjectId); @@ -349,8 +346,7 @@ OperatorShellMake(char *operatorName, */ heap_close(pg_operator_desc); - return - operatorObjectId; + return operatorObjectId; } /* -------------------------------- @@ -545,8 +541,7 @@ OperatorDef(char *operatorName, func_error("OperatorDef", procedureName, nargs, typeId, NULL); values[Anum_pg_operator_oprcode - 1] = ObjectIdGetDatum(tup->t_data->t_oid); - values[Anum_pg_operator_oprresult - 1] = - ObjectIdGetDatum(((Form_pg_proc) + values[Anum_pg_operator_oprresult - 1] = ObjectIdGetDatum(((Form_pg_proc) GETSTRUCT(tup))->prorettype); /* ---------------- @@ -811,15 +806,13 @@ OperatorUpd(Oid baseId, Oid commId, Oid negId) if (!OidIsValid(t->oprnegate)) { - values[Anum_pg_operator_oprnegate - 1] = - ObjectIdGetDatum(baseId); + values[Anum_pg_operator_oprnegate - 1] = ObjectIdGetDatum(baseId); replaces[Anum_pg_operator_oprnegate - 1] = 'r'; } if (!OidIsValid(t->oprcom)) { - values[Anum_pg_operator_oprcom - 1] = - ObjectIdGetDatum(baseId); + values[Anum_pg_operator_oprcom - 1] = ObjectIdGetDatum(baseId); replaces[Anum_pg_operator_oprcom - 1] = 'r'; } diff --git a/src/backend/catalog/pg_type.c b/src/backend/catalog/pg_type.c index f67317defe..17b9574001 100644 --- a/src/backend/catalog/pg_type.c +++ b/src/backend/catalog/pg_type.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/catalog/pg_type.c,v 1.32 1998/12/15 12:45:47 vadim Exp $ + * $Header: /cvsroot/pgsql/src/backend/catalog/pg_type.c,v 1.33 1999/02/03 21:15:56 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -196,8 +196,7 @@ TypeShellMakeWithOpenRelation(Relation pg_type_desc, char *typeName) /* * ... and fill typdefault with a bogus value */ - values[i++] = - (Datum) fmgr(F_TEXTIN, typeName); /* 15 */ + values[i++] = (Datum) fmgr(F_TEXTIN, typeName); /* 15 */ /* ---------------- * create a new type tuple with FormHeapTuple @@ -228,8 +227,7 @@ TypeShellMakeWithOpenRelation(Relation pg_type_desc, char *typeName) */ pfree(tup); - return - typoid; + return typoid; } /* ---------------------------------------------------------------- @@ -271,8 +269,7 @@ TypeShellMake(char *typeName) */ heap_close(pg_type_desc); - return - typoid; + return typoid; } /* ---------------------------------------------------------------- diff --git a/src/backend/commands/cluster.c b/src/backend/commands/cluster.c index 6198b36089..76f3f07801 100644 --- a/src/backend/commands/cluster.c +++ b/src/backend/commands/cluster.c @@ -14,7 +14,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/cluster.c,v 1.36 1999/02/02 03:44:17 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/cluster.c,v 1.37 1999/02/03 21:16:02 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -257,22 +257,19 @@ copy_index(Oid OIDOldIndex, Oid OIDNewHeap) * To do this I get the info from pg_index, re-build the FunctInfo if * I have to, and add a new index with a temporary name. */ - Old_pg_index_Tuple = - SearchSysCacheTuple(INDEXRELID, + Old_pg_index_Tuple = SearchSysCacheTuple(INDEXRELID, ObjectIdGetDatum(RelationGetRelid(OldIndex)), 0, 0, 0); Assert(Old_pg_index_Tuple); Old_pg_index_Form = (Form_pg_index) GETSTRUCT(Old_pg_index_Tuple); - Old_pg_index_relation_Tuple = - SearchSysCacheTuple(RELOID, + Old_pg_index_relation_Tuple = SearchSysCacheTuple(RELOID, ObjectIdGetDatum(RelationGetRelid(OldIndex)), 0, 0, 0); Assert(Old_pg_index_relation_Tuple); - Old_pg_index_relation_Form = - (Form_pg_class) GETSTRUCT(Old_pg_index_relation_Tuple); + Old_pg_index_relation_Form = (Form_pg_class) GETSTRUCT(Old_pg_index_relation_Tuple); /* Set the name. */ NewIndexName = palloc(NAMEDATALEN); /* XXX */ @@ -297,8 +294,7 @@ copy_index(Oid OIDOldIndex, Oid OIDNewHeap) FIgetnArgs(finfo) = natts; FIgetProcOid(finfo) = Old_pg_index_Form->indproc; - pg_proc_Tuple = - SearchSysCacheTuple(PROOID, + pg_proc_Tuple = SearchSysCacheTuple(PROOID, ObjectIdGetDatum(Old_pg_index_Form->indproc), 0, 0, 0); @@ -357,8 +353,7 @@ rebuildheap(Oid OIDNewHeap, Oid OIDOldHeap, Oid OIDOldIndex) LocalHeapTuple.t_self = ScanResult->heap_iptr; heap_fetch(LocalOldHeap, SnapshotNow, &LocalHeapTuple, &LocalBuffer); - OIDNewHeapInsert = - heap_insert(LocalNewHeap, &LocalHeapTuple); + OIDNewHeapInsert = heap_insert(LocalNewHeap, &LocalHeapTuple); pfree(ScanResult); ReleaseBuffer(LocalBuffer); } diff --git a/src/backend/commands/command.c b/src/backend/commands/command.c index abbe30f906..1a65f4d4d0 100644 --- a/src/backend/commands/command.c +++ b/src/backend/commands/command.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.35 1998/12/18 09:10:18 vadim Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.36 1999/02/03 21:16:02 momjian Exp $ * * NOTES * The PortalExecutorHeapMemory crap needs to be eliminated @@ -131,8 +131,7 @@ PerformPortalFetch(char *name, */ context = MemoryContextSwitchTo((MemoryContext) PortalGetHeapMemory(portal)); - AssertState(context == - (MemoryContext) PortalGetHeapMemory(GetPortalByName(NULL))); + AssertState(context == (MemoryContext) PortalGetHeapMemory(GetPortalByName(NULL))); /* ---------------- * setup "feature" to tell the executor what direction and diff --git a/src/backend/commands/copy.c b/src/backend/commands/copy.c index 383db52cd6..ff8555e39d 100644 --- a/src/backend/commands/copy.c +++ b/src/backend/commands/copy.c @@ -6,7 +6,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.70 1999/02/02 03:44:18 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.71 1999/02/03 21:16:03 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -537,10 +537,8 @@ CopyFrom(Relation rel, bool binary, bool oids, FILE *fp, char *delim) if (n_indices > 0) { has_index = true; - itupdescArr = - (TupleDesc *) palloc(n_indices * sizeof(TupleDesc)); - pgIndexP = - (Form_pg_index *) palloc(n_indices * sizeof(Form_pg_index)); + itupdescArr = (TupleDesc *) palloc(n_indices * sizeof(TupleDesc)); + pgIndexP = (Form_pg_index *) palloc(n_indices * sizeof(Form_pg_index)); indexNatts = (int *) palloc(n_indices * sizeof(int)); finfo = (FuncIndexInfo *) palloc(n_indices * sizeof(FuncIndexInfo)); finfoP = (FuncIndexInfo **) palloc(n_indices * sizeof(FuncIndexInfo *)); @@ -549,8 +547,7 @@ CopyFrom(Relation rel, bool binary, bool oids, FILE *fp, char *delim) for (i = 0; i < n_indices; i++) { itupdescArr[i] = RelationGetDescr(index_rels[i]); - pgIndexTup = - SearchSysCacheTuple(INDEXRELID, + pgIndexTup = SearchSysCacheTuple(INDEXRELID, ObjectIdGetDatum(RelationGetRelid(index_rels[i])), 0, 0, 0); Assert(pgIndexTup); @@ -689,8 +686,7 @@ CopyFrom(Relation rel, bool binary, bool oids, FILE *fp, char *delim) done = 1; else { - values[i] = - (Datum) (*fmgr_faddr(&in_functions[i])) (string, + values[i] = (Datum) (*fmgr_faddr(&in_functions[i])) (string, elements[i], typmod[i]); @@ -1008,13 +1004,11 @@ GetIndexRelations(Oid main_relation_oid, while (HeapTupleIsValid(tuple = heap_getnext(scandesc, 0))) { - index_relation_oid = - (Oid) DatumGetInt32(heap_getattr(tuple, 2, + index_relation_oid = (Oid) DatumGetInt32(heap_getattr(tuple, 2, tupDesc, &isnull)); if (index_relation_oid == main_relation_oid) { - scan->index_rel_oid = - (Oid) DatumGetInt32(heap_getattr(tuple, + scan->index_rel_oid = (Oid) DatumGetInt32(heap_getattr(tuple, Anum_pg_index_indexrelid, tupDesc, &isnull)); (*n_indices)++; diff --git a/src/backend/commands/creatinh.c b/src/backend/commands/creatinh.c index 839042ab53..61083a5637 100644 --- a/src/backend/commands/creatinh.c +++ b/src/backend/commands/creatinh.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.38 1999/02/02 03:44:19 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.39 1999/02/03 21:16:03 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -275,13 +275,11 @@ MergeAttributes(List *schema, List *supers, List **supconstr) * form name, type and constraints */ attributeName = (attribute->attname).data; - tuple = - SearchSysCacheTuple(TYPOID, + tuple = SearchSysCacheTuple(TYPOID, ObjectIdGetDatum(attribute->atttypid), 0, 0, 0); Assert(HeapTupleIsValid(tuple)); - attributeType = - (((Form_pg_type) GETSTRUCT(tuple))->typname).data; + attributeType = (((Form_pg_type) GETSTRUCT(tuple))->typname).data; /* * check validity @@ -468,8 +466,7 @@ StoreCatalogInheritance(Oid relationId, List *supers) if (!HeapTupleIsValid(tuple)) break; - lnext(current) = - lconsi(((Form_pg_inherits) + lnext(current) = lconsi(((Form_pg_inherits) GETSTRUCT(tuple))->inhparent, NIL); diff --git a/src/backend/commands/defind.c b/src/backend/commands/defind.c index ed36836f77..a5343bf699 100644 --- a/src/backend/commands/defind.c +++ b/src/backend/commands/defind.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/Attic/defind.c,v 1.32 1999/02/03 20:15:20 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/Attic/defind.c,v 1.33 1999/02/03 21:16:04 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -172,8 +172,7 @@ DefineIndex(char *heapRelationName, strcpy(FIgetname(&fInfo), funcIndex->name); - attributeNumberA = - (AttrNumber *) palloc(nargs * sizeof attributeNumberA[0]); + attributeNumberA = (AttrNumber *) palloc(nargs * sizeof attributeNumberA[0]); classObjectId = (Oid *) palloc(sizeof classObjectId[0]); @@ -194,8 +193,7 @@ DefineIndex(char *heapRelationName, attributeNumberA = (AttrNumber *) palloc(numberOfAttributes * sizeof attributeNumberA[0]); - classObjectId = - (Oid *) palloc(numberOfAttributes * sizeof classObjectId[0]); + classObjectId = (Oid *) palloc(numberOfAttributes * sizeof classObjectId[0]); NormIndexAttrs(attributeList, attributeNumberA, classObjectId, relationId); @@ -306,11 +304,9 @@ ExtendIndex(char *indexRelationName, Expr *predicate, List *rangetable) predInfo->pred = (Node *) cnfPred; predInfo->oldPred = oldPred; - attributeNumberA = - (AttrNumber *) palloc(numberOfAttributes * + attributeNumberA = (AttrNumber *) palloc(numberOfAttributes * sizeof attributeNumberA[0]); - classObjectId = - (Oid *) palloc(numberOfAttributes * sizeof classObjectId[0]); + classObjectId = (Oid *) palloc(numberOfAttributes * sizeof classObjectId[0]); for (i = 0; i < numberOfAttributes; i++) diff --git a/src/backend/commands/trigger.c b/src/backend/commands/trigger.c index 20a542eee5..6f45862322 100644 --- a/src/backend/commands/trigger.c +++ b/src/backend/commands/trigger.c @@ -611,8 +611,7 @@ ExecBRInsertTriggers(Relation rel, HeapTuple trigtuple) int i; SaveTriggerData = (TriggerData *) palloc(sizeof(TriggerData)); - SaveTriggerData->tg_event = - TRIGGER_EVENT_INSERT | TRIGGER_EVENT_ROW | TRIGGER_EVENT_BEFORE; + SaveTriggerData->tg_event = TRIGGER_EVENT_INSERT | TRIGGER_EVENT_ROW | TRIGGER_EVENT_BEFORE; SaveTriggerData->tg_relation = rel; SaveTriggerData->tg_newtuple = NULL; for (i = 0; i < ntrigs; i++) @@ -672,8 +671,7 @@ ExecBRDeleteTriggers(EState *estate, ItemPointer tupleid) return false; SaveTriggerData = (TriggerData *) palloc(sizeof(TriggerData)); - SaveTriggerData->tg_event = - TRIGGER_EVENT_DELETE | TRIGGER_EVENT_ROW | TRIGGER_EVENT_BEFORE; + SaveTriggerData->tg_event = TRIGGER_EVENT_DELETE | TRIGGER_EVENT_ROW | TRIGGER_EVENT_BEFORE; SaveTriggerData->tg_relation = rel; SaveTriggerData->tg_newtuple = NULL; for (i = 0; i < ntrigs; i++) @@ -708,8 +706,7 @@ ExecARDeleteTriggers(EState *estate, ItemPointer tupleid) Assert(trigtuple != NULL); SaveTriggerData = (TriggerData *) palloc(sizeof(TriggerData)); - SaveTriggerData->tg_event = - TRIGGER_EVENT_DELETE | TRIGGER_EVENT_ROW; + SaveTriggerData->tg_event = TRIGGER_EVENT_DELETE | TRIGGER_EVENT_ROW; SaveTriggerData->tg_relation = rel; SaveTriggerData->tg_newtuple = NULL; for (i = 0; i < ntrigs; i++) @@ -750,8 +747,7 @@ ExecBRUpdateTriggers(EState *estate, ItemPointer tupleid, HeapTuple newtuple) intuple = newtuple = ExecRemoveJunk(estate->es_junkFilter, newSlot); SaveTriggerData = (TriggerData *) palloc(sizeof(TriggerData)); - SaveTriggerData->tg_event = - TRIGGER_EVENT_UPDATE | TRIGGER_EVENT_ROW | TRIGGER_EVENT_BEFORE; + SaveTriggerData->tg_event = TRIGGER_EVENT_UPDATE | TRIGGER_EVENT_ROW | TRIGGER_EVENT_BEFORE; SaveTriggerData->tg_relation = rel; for (i = 0; i < ntrigs; i++) { @@ -785,8 +781,7 @@ ExecARUpdateTriggers(EState *estate, ItemPointer tupleid, HeapTuple newtuple) Assert(trigtuple != NULL); SaveTriggerData = (TriggerData *) palloc(sizeof(TriggerData)); - SaveTriggerData->tg_event = - TRIGGER_EVENT_UPDATE | TRIGGER_EVENT_ROW; + SaveTriggerData->tg_event = TRIGGER_EVENT_UPDATE | TRIGGER_EVENT_ROW; SaveTriggerData->tg_relation = rel; for (i = 0; i < ntrigs; i++) { diff --git a/src/backend/commands/vacuum.c b/src/backend/commands/vacuum.c index 6005c107cc..ac8e7a5dea 100644 --- a/src/backend/commands/vacuum.c +++ b/src/backend/commands/vacuum.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.93 1999/01/17 06:18:18 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.94 1999/02/03 21:16:04 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -434,8 +434,7 @@ vc_vacone(Oid relid, bool analyze, List *va_cols) attr_cnt = tcnt; } - vacrelstats->vacattrstats = - (VacAttrStats *) palloc(attr_cnt * sizeof(VacAttrStats)); + vacrelstats->vacattrstats = (VacAttrStats *) palloc(attr_cnt * sizeof(VacAttrStats)); for (i = 0; i < attr_cnt; i++) { diff --git a/src/backend/commands/view.c b/src/backend/commands/view.c index ab38014d53..2c495c6b0c 100644 --- a/src/backend/commands/view.c +++ b/src/backend/commands/view.c @@ -5,7 +5,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: view.c,v 1.30 1999/02/02 03:44:20 momjian Exp $ + * $Id: view.c,v 1.31 1999/02/03 21:16:06 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -165,17 +165,13 @@ DefineViewRules(char *viewName, Query *viewParse) #endif - retrieve_rule = - FormViewRetrieveRule(viewName, viewParse); + retrieve_rule = FormViewRetrieveRule(viewName, viewParse); #ifdef NOTYET - replace_rule = - FormViewReplaceRule(viewName, viewParse); - append_rule = - FormViewAppendRule(viewName, viewParse); - delete_rule = - FormViewDeleteRule(viewName, viewParse); + replace_rule = FormViewReplaceRule(viewName, viewParse); + append_rule = FormViewAppendRule(viewName, viewParse); + delete_rule = FormViewDeleteRule(viewName, viewParse); #endif @@ -233,11 +229,9 @@ UpdateRangeTableOfViewParse(char *viewName, Query *viewParse) * create the 2 new range table entries and form the new range * table... CURRENT first, then NEW.... */ - rt_entry1 = - addRangeTableEntry(NULL, (char *) viewName, "*CURRENT*", + rt_entry1 = addRangeTableEntry(NULL, (char *) viewName, "*CURRENT*", FALSE, FALSE); - rt_entry2 = - addRangeTableEntry(NULL, (char *) viewName, "*NEW*", + rt_entry2 = addRangeTableEntry(NULL, (char *) viewName, "*NEW*", FALSE, FALSE); new_rt = lcons(rt_entry2, old_rt); new_rt = lcons(rt_entry1, new_rt); diff --git a/src/backend/executor/execJunk.c b/src/backend/executor/execJunk.c index bba39a183f..f2848eab22 100644 --- a/src/backend/executor/execJunk.c +++ b/src/backend/executor/execJunk.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/executor/execJunk.c,v 1.14 1998/09/01 03:22:13 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/executor/execJunk.c,v 1.15 1999/02/03 21:16:10 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -386,8 +386,7 @@ ExecRemoveJunk(JunkFilter *junkfilter, TupleTableSlot *slot) */ for (i = 0; i < cleanLength; i++) { - values[i] = - heap_getattr(tuple, cleanMap[i], tupType, &isNull); + values[i] = heap_getattr(tuple, cleanMap[i], tupType, &isNull); if (isNull) nulls[i] = 'n'; diff --git a/src/backend/executor/execQual.c b/src/backend/executor/execQual.c index 17b7a372cc..8b3e082135 100644 --- a/src/backend/executor/execQual.c +++ b/src/backend/executor/execQual.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/executor/execQual.c,v 1.41 1999/01/25 18:02:13 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/executor/execQual.c,v 1.42 1999/02/03 21:16:10 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -882,8 +882,7 @@ ExecEvalOper(Expr *opClause, ExprContext *econtext, bool *isNull) * We don't have operator whose arguments are sets. ****************** */ - return - ExecMakeFunctionResult((Node *) op, argList, econtext, isNull, &isDone); + return ExecMakeFunctionResult((Node *) op, argList, econtext, isNull, &isDone); } /* ---------------------------------------------------------------- @@ -926,8 +925,7 @@ ExecEvalFunc(Expr *funcClause, fcache = func->func_fcache; } - return - ExecMakeFunctionResult((Node *) func, argList, econtext, isNull, isDone); + return ExecMakeFunctionResult((Node *) func, argList, econtext, isNull, isDone); } /* ---------------------------------------------------------------- @@ -1642,8 +1640,7 @@ ExecTargetList(List *targetlist, if (nodomains > 64) pfree(null_head); - return - newTuple; + return newTuple; } /* ---------------------------------------------------------------- diff --git a/src/backend/executor/execTuples.c b/src/backend/executor/execTuples.c index a0fe00bed3..319cea52e8 100644 --- a/src/backend/executor/execTuples.c +++ b/src/backend/executor/execTuples.c @@ -14,7 +14,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/executor/execTuples.c,v 1.21 1998/10/08 18:29:26 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/executor/execTuples.c,v 1.22 1999/02/03 21:16:11 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -870,8 +870,7 @@ ExecCopyTupType(TupleDesc td, int natts) i = 0; while (i < natts) { - newTd[i] = - (Form_pg_attribute)palloc(sizeof(FormData_pg_attribute)); + newTd[i] = (Form_pg_attribute)palloc(sizeof(FormData_pg_attribute)); memmove(newTd[i], td[i], sizeof(FormData_pg_attribute)); i++; } diff --git a/src/backend/executor/execUtils.c b/src/backend/executor/execUtils.c index 58dbcd19ef..885022eb3d 100644 --- a/src/backend/executor/execUtils.c +++ b/src/backend/executor/execUtils.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/executor/execUtils.c,v 1.41 1998/12/15 12:46:05 vadim Exp $ + * $Header: /cvsroot/pgsql/src/backend/executor/execUtils.c,v 1.42 1999/02/03 21:16:11 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -331,8 +331,7 @@ ExecAssignProjectionInfo(Plan *node, CommonState *commonstate) projInfo = makeNode(ProjectionInfo); projInfo->pi_targetlist = targetList; projInfo->pi_len = len; - projInfo->pi_tupValue = - (len <= 0) ? NULL : (Datum *) palloc(sizeof(Datum) * len); + projInfo->pi_tupValue = (len <= 0) ? NULL : (Datum *) palloc(sizeof(Datum) * len); projInfo->pi_exprContext = commonstate->cs_ExprContext; projInfo->pi_slot = commonstate->cs_ResultTupleSlot; diff --git a/src/backend/executor/functions.c b/src/backend/executor/functions.c index 34fe23e0ba..51ea6655e9 100644 --- a/src/backend/executor/functions.c +++ b/src/backend/executor/functions.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/executor/functions.c,v 1.21 1998/11/27 19:52:01 vadim Exp $ + * $Header: /cvsroot/pgsql/src/backend/executor/functions.c,v 1.22 1999/02/03 21:16:12 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -135,8 +135,7 @@ init_execution_state(FunctionCachePtr fcache, int i; ParamListInfo paramLI; - paramLI = - (ParamListInfo) palloc((nargs + 1) * sizeof(ParamListInfoData)); + paramLI = (ParamListInfo) palloc((nargs + 1) * sizeof(ParamListInfoData)); MemSet(paramLI, 0, nargs * sizeof(ParamListInfoData)); @@ -272,8 +271,7 @@ copy_function_result(FunctionCachePtr fcache, while (i < oldTuple->t_data->t_natts) { - funcTd->attrs[i] = - (Form_pg_attribute) palloc(ATTRIBUTE_TUPLE_SIZE); + funcTd->attrs[i] = (Form_pg_attribute) palloc(ATTRIBUTE_TUPLE_SIZE); memmove(funcTd->attrs[i], resultTd->attrs[i], ATTRIBUTE_TUPLE_SIZE); diff --git a/src/backend/executor/nodeAppend.c b/src/backend/executor/nodeAppend.c index 1c2217cdc4..de298359cd 100644 --- a/src/backend/executor/nodeAppend.c +++ b/src/backend/executor/nodeAppend.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/executor/nodeAppend.c,v 1.15 1998/09/01 04:28:26 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/executor/nodeAppend.c,v 1.16 1999/02/03 21:16:12 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -150,14 +150,12 @@ exec_append_initialize_next(Append *node) if (appendstate->as_junkFilter_list) { - estate->es_junkFilter = - (JunkFilter *) nth(whichplan, + estate->es_junkFilter = (JunkFilter *) nth(whichplan, appendstate->as_junkFilter_list); } if (appendstate->as_result_relation_info_list) { - estate->es_result_relation_info = - (RelationInfo *) nth(whichplan, + estate->es_result_relation_info = (RelationInfo *) nth(whichplan, appendstate->as_result_relation_info_list); } result_slot->ttc_whichplan = whichplan; diff --git a/src/backend/executor/nodeHash.c b/src/backend/executor/nodeHash.c index d0b3dc3916..657bb14b34 100644 --- a/src/backend/executor/nodeHash.c +++ b/src/backend/executor/nodeHash.c @@ -6,7 +6,7 @@ * Copyright (c) 1994, Regents of the University of California * * - * $Id: nodeHash.c,v 1.29 1999/01/17 06:18:19 momjian Exp $ + * $Id: nodeHash.c,v 1.30 1999/02/03 21:16:12 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -581,11 +581,9 @@ ExecHashGetBucket(HashJoinTable hashtable, * ------------------ */ if (execConstByVal) - bucketno = - hashFunc((char *) &keyval, execConstLen) % hashtable->totalbuckets; + bucketno = hashFunc((char *) &keyval, execConstLen) % hashtable->totalbuckets; else - bucketno = - hashFunc((char *) keyval, execConstLen) % hashtable->totalbuckets; + bucketno = hashFunc((char *) keyval, execConstLen) % hashtable->totalbuckets; #ifdef HJDEBUG if (bucketno >= hashtable->nbuckets) printf("hash(%d) = %d SAVED\n", keyval, bucketno); diff --git a/src/backend/executor/nodeHashjoin.c b/src/backend/executor/nodeHashjoin.c index 1de20fb165..2350ff4541 100644 --- a/src/backend/executor/nodeHashjoin.c +++ b/src/backend/executor/nodeHashjoin.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/executor/nodeHashjoin.c,v 1.15 1999/01/17 06:18:21 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/executor/nodeHashjoin.c,v 1.16 1999/02/03 21:16:13 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -189,8 +189,7 @@ ExecHashJoin(HashJoin *node) * hash node * ------------------ */ - hjstate->hj_InnerBatches = - hashNode->hashstate->hashBatches; + hjstate->hj_InnerBatches = hashNode->hashstate->hashBatches; } outerbatchPos = (RelativeAddr *) ABSADDR(hashtable->outerbatchPos); curbatch = hashtable->curbatch; @@ -452,17 +451,14 @@ ExecInitHashJoin(HashJoin *node, EState *estate, Plan *parent) */ { HashState *hashstate = hashNode->hashstate; - TupleTableSlot *slot = - hashstate->cstate.cs_ResultTupleSlot; + TupleTableSlot *slot = hashstate->cstate.cs_ResultTupleSlot; hjstate->hj_HashTupleSlot = slot; } - hjstate->hj_OuterTupleSlot->ttc_tupleDescriptor = - ExecGetTupType(outerNode); + hjstate->hj_OuterTupleSlot->ttc_tupleDescriptor = ExecGetTupType(outerNode); /* - hjstate->hj_OuterTupleSlot->ttc_execTupDescriptor = - ExecGetExecTupDesc(outerNode); + hjstate->hj_OuterTupleSlot->ttc_execTupDescriptor = ExecGetExecTupDesc(outerNode); */ /* ---------------- diff --git a/src/backend/executor/nodeIndexscan.c b/src/backend/executor/nodeIndexscan.c index 97469e9929..c731cb1717 100644 --- a/src/backend/executor/nodeIndexscan.c +++ b/src/backend/executor/nodeIndexscan.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/executor/nodeIndexscan.c,v 1.30 1999/01/29 09:22:58 vadim Exp $ + * $Header: /cvsroot/pgsql/src/backend/executor/nodeIndexscan.c,v 1.31 1999/02/03 21:16:14 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -308,8 +308,7 @@ ExecIndexReScan(IndexScan *node, ExprContext *exprCtxt, Plan *parent) if (exprCtxt == NULL) exprCtxt = node->scan.scanstate->cstate.cs_ExprContext; - node->scan.scanstate->cstate.cs_ExprContext->ecxt_outertuple = - exprCtxt->ecxt_outertuple; + node->scan.scanstate->cstate.cs_ExprContext->ecxt_outertuple = exprCtxt->ecxt_outertuple; /* * get the index qualifications and recalculate the appropriate values diff --git a/src/backend/executor/nodeMaterial.c b/src/backend/executor/nodeMaterial.c index 485b962a89..87974668bb 100644 --- a/src/backend/executor/nodeMaterial.c +++ b/src/backend/executor/nodeMaterial.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/executor/nodeMaterial.c,v 1.18 1998/11/27 19:52:03 vadim Exp $ + * $Header: /cvsroot/pgsql/src/backend/executor/nodeMaterial.c,v 1.19 1999/02/03 21:16:14 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -359,8 +359,7 @@ ExecMaterialReScan(Material *node, ExprContext *exprCtxt, Plan *parent) if (matstate->mat_Flag == false) return; - matstate->csstate.css_currentScanDesc = - ExecReScanR(matstate->csstate.css_currentRelation, + matstate->csstate.css_currentScanDesc = ExecReScanR(matstate->csstate.css_currentRelation, matstate->csstate.css_currentScanDesc, node->plan.state->es_direction, 0, NULL); diff --git a/src/backend/executor/nodeMergejoin.c b/src/backend/executor/nodeMergejoin.c index 30c11e8b2f..e851cc4edf 100644 --- a/src/backend/executor/nodeMergejoin.c +++ b/src/backend/executor/nodeMergejoin.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/executor/nodeMergejoin.c,v 1.19 1998/09/01 04:28:35 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/executor/nodeMergejoin.c,v 1.20 1999/02/03 21:16:14 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -513,7 +513,7 @@ ExecMergeJoin(MergeJoin *node) econtext->ecxt_outertuple = outerTupleSlot; mergestate->mj_MarkedTupleSlot->ttc_tupleDescriptor = - innerTupleSlot->ttc_tupleDescriptor; + innerTupleSlot->ttc_tupleDescriptor; /* ---------------- * initialize merge join state to skip inner tuples. diff --git a/src/backend/libpq/portalbuf.c b/src/backend/libpq/portalbuf.c index 21eef4c8fc..2a6ee54a75 100644 --- a/src/backend/libpq/portalbuf.c +++ b/src/backend/libpq/portalbuf.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/libpq/Attic/portalbuf.c,v 1.11 1998/09/01 03:22:49 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/libpq/Attic/portalbuf.c,v 1.12 1999/02/03 21:16:16 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -249,8 +249,7 @@ pbuf_addTupleValueLengths(int n) char * pbuf_addValues(int n) { - return - pbuf_alloc(n); + return pbuf_alloc(n); } /* -------------------------------- @@ -515,6 +514,5 @@ pbuf_findFname(GroupBuffer *group, int field_number) { pbuf_checkFnumber(group, field_number); - return - (group->types[field_number]).name; + return (group->types[field_number]).name; } diff --git a/src/backend/nodes/copyfuncs.c b/src/backend/nodes/copyfuncs.c index 886ebfe5e1..49c7b05b3d 100644 --- a/src/backend/nodes/copyfuncs.c +++ b/src/backend/nodes/copyfuncs.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.58 1999/02/03 20:15:20 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.59 1999/02/03 21:16:17 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -1104,8 +1104,7 @@ CopyPathFields(Path *from, Path *newnode) { for (len = 0; ordering[len] != 0; len++) ; - newnode->p_ordering.ord.sortop = - (Oid *) palloc(sizeof(Oid) * (len + 1)); + newnode->p_ordering.ord.sortop = (Oid *) palloc(sizeof(Oid) * (len + 1)); for (i = 0; i < len; i++) newnode->p_ordering.ord.sortop[i] = ordering[i]; newnode->p_ordering.ord.sortop[len] = 0; diff --git a/src/backend/nodes/readfuncs.c b/src/backend/nodes/readfuncs.c index 07f85a2303..5e548096ae 100644 --- a/src/backend/nodes/readfuncs.c +++ b/src/backend/nodes/readfuncs.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.45 1999/02/03 20:15:22 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.46 1999/02/03 21:16:18 momjian Exp $ * * NOTES * Most of the read functions for plan nodes are tested. (In fact, they @@ -552,8 +552,7 @@ _readIndexScan() _getScan((Scan *) local_node); token = lsptok(NULL, &length); /* eat :indxid */ - local_node->indxid = - toIntList(nodeRead(true)); /* now read it */ + local_node->indxid = toIntList(nodeRead(true)); /* now read it */ token = lsptok(NULL, &length); /* eat :indxqual */ local_node->indxqual = nodeRead(true); /* now read it */ @@ -1296,8 +1295,7 @@ _readRelOptInfo() local_node = makeNode(RelOptInfo); token = lsptok(NULL, &length); /* get :relids */ - local_node->relids = - toIntList(nodeRead(true)); /* now read it */ + local_node->relids = toIntList(nodeRead(true)); /* now read it */ token = lsptok(NULL, &length); /* get :indexed */ token = lsptok(NULL, &length); /* now read it */ @@ -1477,8 +1475,7 @@ _readPath() #if 0 token = lsptok(NULL, &length); /* get :p_ordering */ - local_node->p_ordering = - nodeRead(true); /* now read it */ + local_node->p_ordering = nodeRead(true); /* now read it */ #endif token = lsptok(NULL, &length); /* get :keys */ @@ -1519,8 +1516,7 @@ _readIndexPath() local_node->path.keys = nodeRead(true); /* now read it */ token = lsptok(NULL, &length); /* get :indexid */ - local_node->indexid = - toIntList(nodeRead(true)); + local_node->indexid = toIntList(nodeRead(true)); token = lsptok(NULL, &length); /* get :indexqual */ local_node->indexqual = nodeRead(true); /* now read it */ @@ -1589,8 +1585,7 @@ _readJoinPath() local_node->path.outerjoincost = (Cost) atof(token); token = lsptok(NULL, &length); /* get :joinid */ - local_node->path.joinid = - toIntList(nodeRead(true)); /* now read it */ + local_node->path.joinid = toIntList(nodeRead(true)); /* now read it */ return local_node; } @@ -1657,8 +1652,7 @@ _readMergePath() local_node->jpath.path.outerjoincost = (Cost) atof(token); token = lsptok(NULL, &length); /* get :joinid */ - local_node->jpath.path.joinid = - toIntList(nodeRead(true)); /* now read it */ + local_node->jpath.path.joinid = toIntList(nodeRead(true)); /* now read it */ token = lsptok(NULL, &length); /* get :path_mergeclauses */ local_node->path_mergeclauses = nodeRead(true); /* now read it */ @@ -1734,8 +1728,7 @@ _readHashPath() local_node->jpath.path.outerjoincost = (Cost) atof(token); token = lsptok(NULL, &length); /* get :joinid */ - local_node->jpath.path.joinid = - toIntList(nodeRead(true)); /* now read it */ + local_node->jpath.path.joinid = toIntList(nodeRead(true)); /* now read it */ token = lsptok(NULL, &length); /* get :path_hashclauses */ local_node->path_hashclauses = nodeRead(true); /* now read it */ @@ -1957,8 +1950,7 @@ _readJoinInfo() local_node = makeNode(JoinInfo); token = lsptok(NULL, &length); /* get :otherrels */ - local_node->otherrels = - toIntList(nodeRead(true)); /* now read it */ + local_node->otherrels = toIntList(nodeRead(true)); /* now read it */ token = lsptok(NULL, &length); /* get :jinfo_restrictinfo */ local_node->jinfo_restrictinfo = nodeRead(true); /* now read it */ diff --git a/src/backend/optimizer/geqo/geqo_eval.c b/src/backend/optimizer/geqo/geqo_eval.c index ba6aba90c4..2f3f982e16 100644 --- a/src/backend/optimizer/geqo/geqo_eval.c +++ b/src/backend/optimizer/geqo/geqo_eval.c @@ -5,7 +5,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: geqo_eval.c,v 1.25 1999/02/03 20:15:24 momjian Exp $ + * $Id: geqo_eval.c,v 1.26 1999/02/03 21:16:19 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -269,11 +269,9 @@ init_join_rel(RelOptInfo * outer_rel, RelOptInfo * inner_rel, JoinInfo * joininf * of the outer and inner join relations and then merging the results * together. */ - new_outer_tlist = - new_join_tlist(outer_rel->targetlist, /* XXX 1-based attnos */ + new_outer_tlist = new_join_tlist(outer_rel->targetlist, /* XXX 1-based attnos */ inner_rel->relids, 1); - new_inner_tlist = - new_join_tlist(inner_rel->targetlist, /* XXX 1-based attnos */ + new_inner_tlist = new_join_tlist(inner_rel->targetlist, /* XXX 1-based attnos */ outer_rel->relids, length(new_outer_tlist) + 1); @@ -355,8 +353,7 @@ new_join_tlist(List *tlist, if (in_final_tlist) { resdomno += 1; - temp_node = - lcons(create_tl_element(get_expr(xtl), + temp_node = lcons(create_tl_element(get_expr(xtl), resdomno), NIL); t_list = nconc(t_list, temp_node); @@ -540,8 +537,7 @@ geqo_add_new_joininfos(Query *root, List *joinrels, List *outerrels) new_joininfo->mergejoinable = mergejoinable; new_joininfo->hashjoinable = hashjoinable; new_joininfo->inactive = false; - rel->joininfo = - lappend(rel->joininfo, new_joininfo); + rel->joininfo = lappend(rel->joininfo, new_joininfo); foreach(xsuper_rel, super_rels) { @@ -550,8 +546,7 @@ geqo_add_new_joininfos(Query *root, List *joinrels, List *outerrels) if (nonoverlap_rels(super_rel, joinrel)) { List *new_relids = super_rel->relids; - JoinInfo *other_joininfo = - joininfo_member(new_relids, + JoinInfo *other_joininfo = joininfo_member(new_relids, joinrel->joininfo); if (other_joininfo) @@ -569,8 +564,7 @@ geqo_add_new_joininfos(Query *root, List *joinrels, List *outerrels) new_joininfo->mergejoinable = mergejoinable; new_joininfo->hashjoinable = hashjoinable; new_joininfo->inactive = false; - joinrel->joininfo = - lappend(joinrel->joininfo, + joinrel->joininfo = lappend(joinrel->joininfo, new_joininfo); } } diff --git a/src/backend/optimizer/geqo/geqo_main.c b/src/backend/optimizer/geqo/geqo_main.c index 68b8f6245e..275ed26bff 100644 --- a/src/backend/optimizer/geqo/geqo_main.c +++ b/src/backend/optimizer/geqo/geqo_main.c @@ -6,7 +6,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: geqo_main.c,v 1.11 1998/09/01 04:29:18 momjian Exp $ + * $Id: geqo_main.c,v 1.12 1999/02/03 21:16:22 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -189,8 +189,7 @@ geqo(Query *root) pmx(momma->string, daddy->string, kid->string, pool->string_length); #elif defined(CX) /* CYCLE CROSSOVER */ - cycle_diffs = - cx(momma->string, daddy->string, kid->string, pool->string_length, city_table); + cycle_diffs = cx(momma->string, daddy->string, kid->string, pool->string_length, city_table); /* mutate the child */ if (cycle_diffs == 0) { diff --git a/src/backend/optimizer/geqo/geqo_params.c b/src/backend/optimizer/geqo/geqo_params.c index e3779ead25..f6f608169b 100644 --- a/src/backend/optimizer/geqo/geqo_params.c +++ b/src/backend/optimizer/geqo/geqo_params.c @@ -5,7 +5,7 @@ * * Copyright (c) 1994, Regents of the University of California * -* $Id: geqo_params.c,v 1.11 1999/01/17 06:18:27 momjian Exp $ +* $Id: geqo_params.c,v 1.12 1999/02/03 21:16:23 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -85,8 +85,7 @@ geqo_params(int string_length) /* put together the full pathname to the config file */ - conf_file = - (char *) palloc((strlen(DataDir) + strlen(GEQO_FILE) + 2) * sizeof(char)); + conf_file = (char *) palloc((strlen(DataDir) + strlen(GEQO_FILE) + 2) * sizeof(char)); sprintf(conf_file, "%s/%s", DataDir, GEQO_FILE); diff --git a/src/backend/optimizer/geqo/geqo_pool.c b/src/backend/optimizer/geqo/geqo_pool.c index 40996eff03..9f1a24f4be 100644 --- a/src/backend/optimizer/geqo/geqo_pool.c +++ b/src/backend/optimizer/geqo/geqo_pool.c @@ -5,7 +5,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: geqo_pool.c,v 1.9 1998/09/01 03:23:13 momjian Exp $ + * $Id: geqo_pool.c,v 1.10 1999/02/03 21:16:23 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -109,8 +109,7 @@ random_init_pool(Query *root, Pool *pool, int strt, int stp) * "geqo_recombination.c" * */ - pool->data[i].worth = - geqo_eval(root, chromo[i].string, pool->string_length); /* "from geqo_eval.c" */ + pool->data[i].worth = geqo_eval(root, chromo[i].string, pool->string_length); /* "from geqo_eval.c" */ } } diff --git a/src/backend/optimizer/geqo/geqo_selection.c b/src/backend/optimizer/geqo/geqo_selection.c index 42eac8600d..37d620ea20 100644 --- a/src/backend/optimizer/geqo/geqo_selection.c +++ b/src/backend/optimizer/geqo/geqo_selection.c @@ -5,7 +5,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: geqo_selection.c,v 1.5 1998/09/01 03:23:16 momjian Exp $ + * $Id: geqo_selection.c,v 1.6 1999/02/03 21:16:23 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -97,8 +97,7 @@ linear(int pool_size, double bias) /* bias is y-intercept of linear double index; /* index between 0 and pop_size */ double max = (double) pool_size; - index = - max * (bias - sqrt((bias * bias) - 4.0 * (bias - 1.0) * geqo_rand())) + index = max * (bias - sqrt((bias * bias) - 4.0 * (bias - 1.0) * geqo_rand())) / 2.0 / (bias - 1.0); return (int) index; diff --git a/src/backend/optimizer/path/clausesel.c b/src/backend/optimizer/path/clausesel.c index 3a10b05bb3..f09e0f21e1 100644 --- a/src/backend/optimizer/path/clausesel.c +++ b/src/backend/optimizer/path/clausesel.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/path/clausesel.c,v 1.15 1999/02/03 20:15:28 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/path/clausesel.c,v 1.16 1999/02/03 21:16:24 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -131,8 +131,7 @@ set_rest_selec(Query *root, List *restrictinfo_list) */ if (valid_or_clause(clausenode) || FLOAT_IS_ZERO(cost_clause)) { - clausenode->selectivity = - compute_clause_selec(root, + clausenode->selectivity = compute_clause_selec(root, (Node *) clausenode->clause, lcons(makeFloat(cost_clause), NIL)); } diff --git a/src/backend/optimizer/path/hashutils.c b/src/backend/optimizer/path/hashutils.c index e55496809d..cf393ebb1f 100644 --- a/src/backend/optimizer/path/hashutils.c +++ b/src/backend/optimizer/path/hashutils.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/hashutils.c,v 1.8 1999/02/03 20:15:32 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/hashutils.c,v 1.9 1999/02/03 21:16:25 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -60,8 +60,7 @@ group_clauses_by_hashop(List *restrictinfo_list, Var *rightop = get_rightop(clause); JoinKey *keys = (JoinKey *) NULL; - xhashinfo = - match_hashop_hashinfo(hashjoinop, hashinfo_list); + xhashinfo = match_hashop_hashinfo(hashjoinop, hashinfo_list); if (inner_relid == leftop->varno) { @@ -89,11 +88,9 @@ group_clauses_by_hashop(List *restrictinfo_list, hashinfo_list = nreverse(hashinfo_list); } - xhashinfo->jmethod.clauses = - lcons(clause, xhashinfo->jmethod.clauses); + xhashinfo->jmethod.clauses = lcons(clause, xhashinfo->jmethod.clauses); - xhashinfo->jmethod.jmkeys = - lcons(keys, xhashinfo->jmethod.jmkeys); + xhashinfo->jmethod.jmkeys = lcons(keys, xhashinfo->jmethod.jmkeys); } } return hashinfo_list; diff --git a/src/backend/optimizer/path/indxpath.c b/src/backend/optimizer/path/indxpath.c index d46876ec0c..42cbade63a 100644 --- a/src/backend/optimizer/path/indxpath.c +++ b/src/backend/optimizer/path/indxpath.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.36 1999/02/03 20:15:32 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.37 1999/02/03 21:16:26 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -238,8 +238,7 @@ match_index_orclauses(RelOptInfo * rel, * each of its subclauses. The list is generated by adding * 'index' to the existing list where appropriate. */ - restrictinfo->indexids = - match_index_orclause(rel, index, indexkey, + restrictinfo->indexids = match_index_orclause(rel, index, indexkey, xclass, restrictinfo->clause->args, restrictinfo->indexids); @@ -649,8 +648,7 @@ match_clause_to_indexkey(RelOptInfo * rel, { restrict_op = oprid(newop); - isIndexable = - (op_class(restrict_op, xclass, index->relam) && + isIndexable = (op_class(restrict_op, xclass, index->relam) && IndexScanableOperand(leftop, indexkey, rel, @@ -670,8 +668,7 @@ match_clause_to_indexkey(RelOptInfo * rel, else if ((leftop && IsA(leftop, Const)) || (leftop && IsA(leftop, Param))) { - restrict_op = - get_commutator(((Oper *) ((Expr *) clause)->oper)->opno); + restrict_op = get_commutator(((Oper *) ((Expr *) clause)->oper)->opno); isIndexable = ((restrict_op != InvalidOid) && op_class(restrict_op, xclass, index->relam) && @@ -703,8 +700,7 @@ match_clause_to_indexkey(RelOptInfo * rel, if (HeapTupleIsValid(newop) && (oprid(newop) != restrict_op)) { - restrict_op = - get_commutator(oprid(newop)); + restrict_op = get_commutator(oprid(newop)); isIndexable = ((restrict_op != InvalidOid) && op_class(restrict_op, xclass, index->relam) && @@ -1201,8 +1197,7 @@ indexable_joinclauses(RelOptInfo * rel, RelOptInfo * index, if (joininfo->jinfo_restrictinfo == NIL) continue; - clausegroups = - group_clauses_by_ikey_for_joins(rel, + clausegroups = group_clauses_by_ikey_for_joins(rel, index, index->indexkeys, index->classlist, @@ -1213,8 +1208,7 @@ indexable_joinclauses(RelOptInfo * rel, RelOptInfo * index, { List *clauses = lfirst(clausegroups); - ((RestrictInfo *) lfirst(clauses))->cinfojoinid = - joininfo->otherrels; + ((RestrictInfo *) lfirst(clauses))->cinfojoinid = joininfo->otherrels; } cg_list = nconc(cg_list, clausegroups); } @@ -1306,8 +1300,7 @@ index_innerjoin(Query *root, RelOptInfo * rel, List *clausegroup_list, pathnode->path.joinid = ((RestrictInfo *) lfirst(clausegroup))->cinfojoinid; - pathnode->path.path_cost = - cost_index((Oid) lfirsti(index->relids), + pathnode->path.path_cost = cost_index((Oid) lfirsti(index->relids), (int) temp_pages, temp_selec, rel->pages, @@ -1320,16 +1313,14 @@ index_innerjoin(Query *root, RelOptInfo * rel, List *clausegroup_list, * copy restrictinfo list into path for expensive function * processing -- JMH, 7/7/92 */ - pathnode->path.loc_restrictinfo = - set_difference(copyObject((Node *) rel->restrictinfo), + pathnode->path.loc_restrictinfo = set_difference(copyObject((Node *) rel->restrictinfo), clausegroup); #if 0 /* fix xfunc */ /* add in cost for expensive functions! -- JMH, 7/7/92 */ if (XfuncMode != XFUNC_OFF) { - ((Path *) pathnode)->path_cost += - xfunc_get_path_cost((Path *) pathnode); + ((Path *) pathnode)->path_cost += xfunc_get_path_cost((Path *) pathnode); } #endif cg_list = lappend(cg_list, pathnode); diff --git a/src/backend/optimizer/path/joinpath.c b/src/backend/optimizer/path/joinpath.c index 3199abedf9..bd3c3b2410 100644 --- a/src/backend/optimizer/path/joinpath.c +++ b/src/backend/optimizer/path/joinpath.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinpath.c,v 1.11 1999/02/03 20:15:33 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinpath.c,v 1.12 1999/02/03 21:16:27 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -96,15 +96,13 @@ find_all_join_paths(Query *root, List *joinrels) outerrel->relids); if (_enable_mergejoin_) { - mergeinfo_list = - group_clauses_by_order(joinrel->restrictinfo, + mergeinfo_list = group_clauses_by_order(joinrel->restrictinfo, lfirsti(innerrel->relids)); } if (_enable_hashjoin_) { - hashinfo_list = - group_clauses_by_hashop(joinrel->restrictinfo, + hashinfo_list = group_clauses_by_hashop(joinrel->restrictinfo, lfirsti(innerrel->relids)); } @@ -123,8 +121,7 @@ find_all_join_paths(Query *root, List *joinrels) * explicitly sorted. This may include either nestloops and * mergejoins where the outer path is already ordered. */ - pathlist = - add_pathlist(joinrel, pathlist, + pathlist = add_pathlist(joinrel, pathlist, match_unsorted_outer(joinrel, outerrel, innerrel, @@ -139,8 +136,7 @@ find_all_join_paths(Query *root, List *joinrels) * the actual nestloop nodes were constructed in * (match-unsorted-outer). */ - pathlist = - add_pathlist(joinrel, pathlist, + pathlist = add_pathlist(joinrel, pathlist, match_unsorted_inner(joinrel, outerrel, innerrel, innerrel->pathlist, @@ -151,8 +147,7 @@ find_all_join_paths(Query *root, List *joinrels) * hashed before being joined. */ - pathlist = - add_pathlist(joinrel, pathlist, + pathlist = add_pathlist(joinrel, pathlist, hash_inner_and_outer(joinrel, outerrel, innerrel, hashinfo_list)); @@ -251,22 +246,18 @@ sort_inner_and_outer(RelOptInfo * joinrel, { xmergeinfo = (MInfo *) lfirst(i); - outerkeys = - extract_path_keys(xmergeinfo->jmethod.jmkeys, + outerkeys = extract_path_keys(xmergeinfo->jmethod.jmkeys, outerrel->targetlist, OUTER); - innerkeys = - extract_path_keys(xmergeinfo->jmethod.jmkeys, + innerkeys = extract_path_keys(xmergeinfo->jmethod.jmkeys, innerrel->targetlist, INNER); - merge_pathkeys = - new_join_pathkeys(outerkeys, joinrel->targetlist, + merge_pathkeys = new_join_pathkeys(outerkeys, joinrel->targetlist, xmergeinfo->jmethod.clauses); - temp_node = - create_mergejoin_path(joinrel, + temp_node = create_mergejoin_path(joinrel, outerrel->size, innerrel->size, outerrel->width, @@ -342,8 +333,7 @@ match_unsorted_outer(RelOptInfo * joinrel, if (outerpath_ordering) { - xmergeinfo = - match_order_mergeinfo(outerpath_ordering, + xmergeinfo = match_order_mergeinfo(outerpath_ordering, mergeinfo_list); } @@ -355,14 +345,12 @@ match_unsorted_outer(RelOptInfo * joinrel, List *keys = xmergeinfo->jmethod.jmkeys; List *clauses = xmergeinfo->jmethod.clauses; - matchedJoinKeys = - match_pathkeys_joinkeys(outerpath->keys, + matchedJoinKeys = match_pathkeys_joinkeys(outerpath->keys, keys, clauses, OUTER, &matchedJoinClauses); - merge_pathkeys = - new_join_pathkeys(outerpath->keys, + merge_pathkeys = new_join_pathkeys(outerpath->keys, joinrel->targetlist, clauses); } else @@ -385,14 +373,12 @@ match_unsorted_outer(RelOptInfo * joinrel, { bool path_is_cheaper_than_sort; List *varkeys = NIL; - Path *mergeinnerpath = - match_paths_joinkeys(matchedJoinKeys, + Path *mergeinnerpath = match_paths_joinkeys(matchedJoinKeys, outerpath_ordering, innerrel->pathlist, INNER); - path_is_cheaper_than_sort = - (bool) (mergeinnerpath && + path_is_cheaper_than_sort = (bool) (mergeinnerpath && (mergeinnerpath->path_cost < (cheapest_inner->path_cost + cost_sort(matchedJoinKeys, @@ -401,8 +387,7 @@ match_unsorted_outer(RelOptInfo * joinrel, false)))); if (!path_is_cheaper_than_sort) { - varkeys = - extract_path_keys(matchedJoinKeys, + varkeys = extract_path_keys(matchedJoinKeys, innerrel->targetlist, INNER); } @@ -419,8 +404,7 @@ match_unsorted_outer(RelOptInfo * joinrel, else mergeinnerpath = cheapest_inner; - temp_node = - lcons(create_mergejoin_path(joinrel, + temp_node = lcons(create_mergejoin_path(joinrel, outerrel->size, innerrel->size, outerrel->width, @@ -492,8 +476,7 @@ match_unsorted_inner(RelOptInfo * joinrel, if (innerpath_ordering) { - xmergeinfo = - match_order_mergeinfo(innerpath_ordering, + xmergeinfo = match_order_mergeinfo(innerpath_ordering, mergeinfo_list); } @@ -505,8 +488,7 @@ match_unsorted_inner(RelOptInfo * joinrel, List *keys = xmergeinfo->jmethod.jmkeys; List *cls = xmergeinfo->jmethod.clauses; - matchedJoinKeys = - match_pathkeys_joinkeys(innerpath->keys, + matchedJoinKeys = match_pathkeys_joinkeys(innerpath->keys, keys, cls, INNER, @@ -528,17 +510,14 @@ match_unsorted_inner(RelOptInfo * joinrel, if (temp2) { - List *outerkeys = - extract_path_keys(matchedJoinKeys, + List *outerkeys = extract_path_keys(matchedJoinKeys, outerrel->targetlist, OUTER); - List *merge_pathkeys = - new_join_pathkeys(outerkeys, + List *merge_pathkeys = new_join_pathkeys(outerkeys, joinrel->targetlist, clauses); - temp_node = - lcons(create_mergejoin_path(joinrel, + temp_node = lcons(create_mergejoin_path(joinrel, outerrel->size, innerrel->size, outerrel->width, @@ -611,16 +590,13 @@ hash_inner_and_outer(RelOptInfo * joinrel, foreach(i, hashinfo_list) { xhashinfo = (HInfo *) lfirst(i); - outerkeys = - extract_path_keys(((JoinMethod *) xhashinfo)->jmkeys, + outerkeys = extract_path_keys(((JoinMethod *) xhashinfo)->jmkeys, outerrel->targetlist, OUTER); - innerkeys = - extract_path_keys(((JoinMethod *) xhashinfo)->jmkeys, + innerkeys = extract_path_keys(((JoinMethod *) xhashinfo)->jmkeys, innerrel->targetlist, INNER); - hash_pathkeys = - new_join_pathkeys(outerkeys, + hash_pathkeys = new_join_pathkeys(outerkeys, joinrel->targetlist, ((JoinMethod *) xhashinfo)->clauses); diff --git a/src/backend/optimizer/path/joinrels.c b/src/backend/optimizer/path/joinrels.c index 34eec9fe5a..b7eca9ac0c 100644 --- a/src/backend/optimizer/path/joinrels.c +++ b/src/backend/optimizer/path/joinrels.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinrels.c,v 1.16 1999/02/03 20:15:33 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinrels.c,v 1.17 1999/02/03 21:16:27 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -203,11 +203,9 @@ init_join_rel(RelOptInfo * outer_rel, RelOptInfo * inner_rel, JoinInfo * joininf * of the outer and inner join relations and then merging the results * together. */ - new_outer_tlist = - new_join_tlist(outer_rel->targetlist, /* XXX 1-based attnos */ + new_outer_tlist = new_join_tlist(outer_rel->targetlist, /* XXX 1-based attnos */ inner_rel->relids, 1); - new_inner_tlist = - new_join_tlist(inner_rel->targetlist, /* XXX 1-based attnos */ + new_inner_tlist = new_join_tlist(inner_rel->targetlist, /* XXX 1-based attnos */ outer_rel->relids, length(new_outer_tlist) + 1); @@ -243,8 +241,7 @@ init_join_rel(RelOptInfo * outer_rel, RelOptInfo * inner_rel, JoinInfo * joininf joininfo->inactive = true; } - joinrel_joininfo_list = - new_joininfo_list(append(outer_rel->joininfo, inner_rel->joininfo), + joinrel_joininfo_list = new_joininfo_list(append(outer_rel->joininfo, inner_rel->joininfo), intAppend(outer_rel->relids, inner_rel->relids)); joinrel->joininfo = joinrel_joininfo_list; @@ -291,8 +288,7 @@ new_join_tlist(List *tlist, if (in_final_tlist) { resdomno += 1; - temp_node = - lcons(create_tl_element(get_expr(xtl), + temp_node = lcons(create_tl_element(get_expr(xtl), resdomno), NIL); t_list = nconc(t_list, temp_node); @@ -346,8 +342,7 @@ new_joininfo_list(List *joininfo_list, List *join_relids) current_joininfo_list); if (other_joininfo) { - other_joininfo->jinfo_restrictinfo = - (List *) LispUnion(joininfo->jinfo_restrictinfo, + other_joininfo->jinfo_restrictinfo = (List *) LispUnion(joininfo->jinfo_restrictinfo, other_joininfo->jinfo_restrictinfo); } else @@ -425,8 +420,7 @@ add_new_joininfos(Query *root, List *joinrels, List *outerrels) new_joininfo->mergejoinable = mergejoinable; new_joininfo->hashjoinable = hashjoinable; new_joininfo->inactive = false; - rel->joininfo = - lappend(rel->joininfo, new_joininfo); + rel->joininfo = lappend(rel->joininfo, new_joininfo); foreach(xsuper_rel, super_rels) { @@ -435,14 +429,12 @@ add_new_joininfos(Query *root, List *joinrels, List *outerrels) if (nonoverlap_rels(super_rel, joinrel)) { List *new_relids = super_rel->relids; - JoinInfo *other_joininfo = - joininfo_member(new_relids, + JoinInfo *other_joininfo = joininfo_member(new_relids, joinrel->joininfo); if (other_joininfo) { - other_joininfo->jinfo_restrictinfo = - (List *) LispUnion(restrict_info, + other_joininfo->jinfo_restrictinfo = (List *) LispUnion(restrict_info, other_joininfo->jinfo_restrictinfo); } else @@ -454,8 +446,7 @@ add_new_joininfos(Query *root, List *joinrels, List *outerrels) new_joininfo->mergejoinable = mergejoinable; new_joininfo->hashjoinable = hashjoinable; new_joininfo->inactive = false; - joinrel->joininfo = - lappend(joinrel->joininfo, + joinrel->joininfo = lappend(joinrel->joininfo, new_joininfo); } } diff --git a/src/backend/optimizer/path/joinutils.c b/src/backend/optimizer/path/joinutils.c index 3b0bce8394..411efe94fb 100644 --- a/src/backend/optimizer/path/joinutils.c +++ b/src/backend/optimizer/path/joinutils.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/joinutils.c,v 1.8 1998/09/01 04:29:38 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/joinutils.c,v 1.9 1999/02/03 21:16:27 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -85,8 +85,7 @@ match_pathkeys_joinkeys(List *pathkeys, foreach(i, pathkeys) { pathkey = lfirst(i); - matched_joinkey_index = - match_pathkey_joinkeys(pathkey, joinkeys, which_subkey); + matched_joinkey_index = match_pathkey_joinkeys(pathkey, joinkeys, which_subkey); if (matched_joinkey_index != -1) { @@ -287,8 +286,7 @@ extract_path_keys(List *joinkeys, if (p != NIL) continue; /* key already in pathkeys */ - pathkeys = - lappend(pathkeys, lcons(key, NIL)); + pathkeys = lappend(pathkeys, lcons(key, NIL)); } return pathkeys; } @@ -371,8 +369,7 @@ new_join_pathkey(List *subkeys, subkey = (Var *) lfirst(i); if (subkey == NULL) break; /* XXX something is wrong */ - matched_subkeys = - new_matching_subkeys(subkey, considered_subkeys, + matched_subkeys = new_matching_subkeys(subkey, considered_subkeys, join_rel_tlist, joinclauses); tlist_key = matching_tlvar(subkey, join_rel_tlist); newly_considered_subkeys = NIL; @@ -386,8 +383,7 @@ new_join_pathkey(List *subkeys, else newly_considered_subkeys = matched_subkeys; - considered_subkeys = - append(considered_subkeys, newly_considered_subkeys); + considered_subkeys = append(considered_subkeys, newly_considered_subkeys); t_list = nconc(t_list, newly_considered_subkeys); } @@ -426,8 +422,7 @@ new_matching_subkeys(Var *subkey, foreach(i, joinclauses) { joinclause = lfirst(i); - tlist_other_var = - matching_tlvar(other_join_clause_var(subkey, joinclause), + tlist_other_var = matching_tlvar(other_join_clause_var(subkey, joinclause), join_rel_tlist); if (tlist_other_var && diff --git a/src/backend/optimizer/path/mergeutils.c b/src/backend/optimizer/path/mergeutils.c index 5e465f1e39..45882728b7 100644 --- a/src/backend/optimizer/path/mergeutils.c +++ b/src/backend/optimizer/path/mergeutils.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/mergeutils.c,v 1.10 1999/02/03 20:15:33 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/mergeutils.c,v 1.11 1999/02/03 21:16:27 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -84,11 +84,9 @@ group_clauses_by_order(List *restrictinfo_list, mergeinfo_list); } - ((JoinMethod *) xmergeinfo)->clauses = - lcons(clause, + ((JoinMethod *) xmergeinfo)->clauses = lcons(clause, ((JoinMethod *) xmergeinfo)->clauses); - ((JoinMethod *) xmergeinfo)->jmkeys = - lcons(keys, + ((JoinMethod *) xmergeinfo)->jmkeys = lcons(keys, ((JoinMethod *) xmergeinfo)->jmkeys); } } diff --git a/src/backend/optimizer/path/orindxpath.c b/src/backend/optimizer/path/orindxpath.c index 6537ac1338..9ae341d542 100644 --- a/src/backend/optimizer/path/orindxpath.c +++ b/src/backend/optimizer/path/orindxpath.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/path/orindxpath.c,v 1.13 1999/02/03 20:15:33 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/path/orindxpath.c,v 1.14 1999/02/03 21:16:28 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -121,16 +121,14 @@ create_or_index_paths(Query *root, * copy restrictinfo list into path for expensive function * processing -- JMH, 7/7/92 */ - pathnode->path.loc_restrictinfo = - set_difference(copyObject((Node *) rel->restrictinfo), + pathnode->path.loc_restrictinfo = set_difference(copyObject((Node *) rel->restrictinfo), lcons(clausenode, NIL)); #if 0 /* fix xfunc */ /* add in cost for expensive functions! -- JMH, 7/7/92 */ if (XfuncMode != XFUNC_OFF) { - ((Path *) pathnode)->path_cost += - xfunc_get_path_cost((Path) pathnode); + ((Path *) pathnode)->path_cost += xfunc_get_path_cost((Path) pathnode); } #endif clausenode->selectivity = (Cost) floatVal(selecs); diff --git a/src/backend/optimizer/path/predmig.c b/src/backend/optimizer/path/predmig.c index fcd77f85d7..5aa37e6571 100644 --- a/src/backend/optimizer/path/predmig.c +++ b/src/backend/optimizer/path/predmig.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/predmig.c,v 1.14 1999/02/03 20:15:34 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/predmig.c,v 1.15 1999/02/03 21:16:28 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -256,13 +256,11 @@ xfunc_llel_chains(Stream root, Stream bottom) * i.e. it would be lower than the attributes it references. */ Assert(xfunc_num_relids(pathstream) > xfunc_num_relids(tmpstream)); - progress = - xfunc_prdmig_pullup(origstream, tmpstream, + progress = xfunc_prdmig_pullup(origstream, tmpstream, (JoinPath) get_pathptr(pathstream)); } if (get_downstream(tmpstream)) - pathstream = - (Stream) xfunc_get_downjoin((Stream) get_downstream(tmpstream)); + pathstream = (Stream) xfunc_get_downjoin((Stream) get_downstream(tmpstream)); } /* free up origstream */ @@ -526,8 +524,7 @@ xfunc_add_clauses(Stream current) /* first add in the local clauses */ foreach(temp, get_loc_restrictinfo((Path) get_pathptr(current))) { - topnode = - xfunc_streaminsert((RestrictInfo) lfirst(temp), topnode, + topnode = xfunc_streaminsert((RestrictInfo) lfirst(temp), topnode, XFUNC_LOCPRD); } @@ -538,8 +535,7 @@ xfunc_add_clauses(Stream current) foreach(temp, get_pathrestrictinfo((JoinPath) get_pathptr(current))) { if (!equal(get_clause((RestrictInfo) lfirst(temp)), primjoin)) - topnode = - xfunc_streaminsert((RestrictInfo) lfirst(temp), topnode, + topnode = xfunc_streaminsert((RestrictInfo) lfirst(temp), topnode, XFUNC_JOINPRD); } } diff --git a/src/backend/optimizer/path/xfunc.c b/src/backend/optimizer/path/xfunc.c index d9d22f37f9..b8707c4125 100644 --- a/src/backend/optimizer/path/xfunc.c +++ b/src/backend/optimizer/path/xfunc.c @@ -9,7 +9,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/xfunc.c,v 1.23 1999/02/03 20:15:34 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/xfunc.c,v 1.24 1999/02/03 21:16:29 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -80,8 +80,7 @@ xfunc_trypullup(RelOptInfo rel) for (ever) { /* No, the following should NOT be '==' !! */ - if (clausetype = - xfunc_shouldpull((Path) get_innerjoinpath(curpath), + if (clausetype = xfunc_shouldpull((Path) get_innerjoinpath(curpath), curpath, INNER, &maxcinfo)) { @@ -96,8 +95,7 @@ xfunc_trypullup(RelOptInfo rel) { /* No, the following should NOT be '==' !! */ - if (clausetype = - xfunc_shouldpull((Path) get_outerjoinpath(curpath), + if (clausetype = xfunc_shouldpull((Path) get_outerjoinpath(curpath), curpath, OUTER, &maxcinfo)) { @@ -644,8 +642,7 @@ xfunc_width(LispValue clause) { /* Param node projects a complex type */ Assert(length(get_param_tlist((Param) clause)) == 1); /* sanity */ - retval = - xfunc_width((LispValue) + retval = xfunc_width((LispValue) get_expr(lfirst(get_param_tlist((Param) clause)))); } else @@ -696,8 +693,7 @@ xfunc_width(LispValue clause) * the projected attribute */ Assert(length(get_func_tlist(func)) == 1); /* sanity */ - retval = - xfunc_width((LispValue) + retval = xfunc_width((LispValue) get_expr(lfirst(get_func_tlist(func)))); goto exit; } @@ -774,8 +770,7 @@ xfunc_card_product(Query *queryInfo, Relid relids) foreach(cinfonode, get_restrictinfo(currel)) { if (!xfunc_expense(queryInfo, get_clause((RestrictInfo) lfirst(cinfonode)))) - tuples *= - compute_clause_selec(queryInfo, + tuples *= compute_clause_selec(queryInfo, get_clause((RestrictInfo) lfirst(cinfonode)), LispNil); } @@ -1240,8 +1235,7 @@ xfunc_disjunct_sort(LispValue clause_list) foreach(temp, clause_list) if (or_clause(lfirst(temp))) - lnext(lfirst(temp)) = - lisp_qsort(lnext(lfirst(temp)), xfunc_disjunct_compare); + lnext(lfirst(temp)) = lisp_qsort(lnext(lfirst(temp)), xfunc_disjunct_compare); } diff --git a/src/backend/optimizer/plan/createplan.c b/src/backend/optimizer/plan/createplan.c index 656f8293cb..86a143199c 100644 --- a/src/backend/optimizer/plan/createplan.c +++ b/src/backend/optimizer/plan/createplan.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.35 1999/02/03 20:15:37 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.36 1999/02/03 21:16:30 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -396,11 +396,9 @@ create_indexscan_node(IndexPath *best_path, (List *) copyObject(lfirst(indxqual))); } - fixed_indxqual = - (List *) fix_indxqual_references((Node *) indxqual, (Path *) best_path); + fixed_indxqual = (List *) fix_indxqual_references((Node *) indxqual, (Path *) best_path); - scan_node = - make_indexscan(tlist, + scan_node = make_indexscan(tlist, qpqual, lfirsti(best_path->path.parent->relids), best_path->indexid, @@ -470,12 +468,10 @@ create_nestloop_node(JoinPath *best_path, List *new_inner_qual = NIL; clauses = set_difference(clauses, inner_indxqual); /* XXX */ - new_inner_qual = - index_outerjoin_references(inner_indxqual, + new_inner_qual = index_outerjoin_references(inner_indxqual, outer_node->targetlist, ((Scan *) inner_node)->scanrelid); - ((IndexScan *) inner_node)->indxqual = - lcons(new_inner_qual, NIL); + ((IndexScan *) inner_node)->indxqual = lcons(new_inner_qual, NIL); } } else if (IsA_Join(inner_node)) @@ -533,17 +529,14 @@ create_mergejoin_node(MergePath *best_path, outer_tlist, inner_tlist)); - opcode = - get_opcode((best_path->jpath.path.p_ordering.ord.merge)->join_operator); + opcode = get_opcode((best_path->jpath.path.p_ordering.ord.merge)->join_operator); outer_order = (Oid *) palloc(sizeof(Oid) * 2); - outer_order[0] = - (best_path->jpath.path.p_ordering.ord.merge)->left_operator; + outer_order[0] = (best_path->jpath.path.p_ordering.ord.merge)->left_operator; outer_order[1] = 0; inner_order = (Oid *) palloc(sizeof(Oid) * 2); - inner_order[0] = - (best_path->jpath.path.p_ordering.ord.merge)->right_operator; + inner_order[0] = (best_path->jpath.path.p_ordering.ord.merge)->right_operator; inner_order[1] = 0; /* @@ -615,8 +608,7 @@ create_hashjoin_node(HashPath *best_path, * Separate the hashclauses from the other join qualification clauses * and set those clauses to contain references to lower attributes. */ - qpqual = - join_references(set_difference(clauses, + qpqual = join_references(set_difference(clauses, best_path->path_hashclauses), outer_tlist, inner_tlist); @@ -625,8 +617,7 @@ create_hashjoin_node(HashPath *best_path, * Now set the references in the hashclauses and rearrange them so * that the outer variable is always on the left. */ - hashclauses = - switch_outer(join_references(best_path->path_hashclauses, + hashclauses = switch_outer(join_references(best_path->path_hashclauses, outer_tlist, inner_tlist)); @@ -690,8 +681,7 @@ fix_indxqual_references(Node *clause, Path *index_path) is_funcclause((Node *) get_leftop((Expr *) clause)) && ((Func *) ((Expr *) get_leftop((Expr *) clause))->oper)->funcisindex) { - Var *newvar = - makeVar((Index) lfirsti(index_path->parent->relids), + Var *newvar = makeVar((Index) lfirsti(index_path->parent->relids), 1, /* func indices have one key */ ((Func *) ((Expr *) clause)->oper)->functype, -1, @@ -699,8 +689,7 @@ fix_indxqual_references(Node *clause, Path *index_path) (Index) lfirsti(index_path->parent->relids), 0); - return - ((Node *) make_opclause((Oper *) ((Expr *) clause)->oper, + return ((Node *) make_opclause((Oper *) ((Expr *) clause)->oper, newvar, get_rightop((Expr *) clause))); @@ -716,8 +705,7 @@ fix_indxqual_references(Node *clause, Path *index_path) { subclause = lfirst(i); if (subclause) - new_subclauses = - lappend(new_subclauses, + new_subclauses = lappend(new_subclauses, fix_indxqual_references(subclause, index_path)); @@ -751,8 +739,7 @@ fix_indxqual_references(Node *clause, Path *index_path) { subclause = lfirst(i); if (subclause) - new_subclauses = - lappend(new_subclauses, + new_subclauses = lappend(new_subclauses, fix_indxqual_references(subclause, index_path)); diff --git a/src/backend/optimizer/plan/initsplan.c b/src/backend/optimizer/plan/initsplan.c index 9098c70957..881accd2aa 100644 --- a/src/backend/optimizer/plan/initsplan.c +++ b/src/backend/optimizer/plan/initsplan.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/initsplan.c,v 1.21 1999/02/03 20:15:38 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/initsplan.c,v 1.22 1999/02/03 21:16:35 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -208,8 +208,7 @@ add_clause_to_rels(Query *root, List *clause) } else { - restrictinfo->selectivity = - compute_clause_selec(root, (Node *) clause, NIL); + restrictinfo->selectivity = compute_clause_selec(root, (Node *) clause, NIL); } rel->restrictinfo = lcons(restrictinfo, rel->restrictinfo); } @@ -232,8 +231,7 @@ add_clause_to_rels(Query *root, List *clause) } else { - restrictinfo->selectivity = - compute_clause_selec(root, (Node *) clause, NIL); + restrictinfo->selectivity = compute_clause_selec(root, (Node *) clause, NIL); } add_join_info_to_rels(root, restrictinfo, relids); /* we are going to be doing a join, so add var to targetlist */ @@ -272,8 +270,7 @@ add_join_info_to_rels(Query *root, RestrictInfo * restrictinfo, List *join_relid joininfo = find_joininfo_node(get_base_rel(root, lfirsti(join_relid)), other_rels); - joininfo->jinfo_restrictinfo = - lcons(copyObject((void *) restrictinfo), joininfo->jinfo_restrictinfo); + joininfo->jinfo_restrictinfo = lcons(copyObject((void *) restrictinfo), joininfo->jinfo_restrictinfo); } } diff --git a/src/backend/optimizer/plan/planner.c b/src/backend/optimizer/plan/planner.c index 7bbd2db431..07abe77c58 100644 --- a/src/backend/optimizer/plan/planner.c +++ b/src/backend/optimizer/plan/planner.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.41 1999/02/03 20:15:39 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planner.c,v 1.42 1999/02/03 21:16:36 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -124,8 +124,7 @@ union_planner(Query *parse) parse->resultRelation, parse->rtable); } - else if ((rt_index = - first_inherit_rt_entry(rangetable)) != -1) + else if ((rt_index = first_inherit_rt_entry(rangetable)) != -1) { if (parse->rowMark != NULL) elog(ERROR, "SELECT FOR UPDATE is not supported for inherit queries"); @@ -263,8 +262,7 @@ union_planner(Query *parse) * get the varno/attno entries to the appropriate references to * the result tuple of the subplans. */ - ((Agg *) result_plan)->aggs = - get_agg_tlist_references((Agg *) result_plan); + ((Agg *) result_plan)->aggs = get_agg_tlist_references((Agg *) result_plan); /***S*H***/ if(parse->havingQual!=NULL) diff --git a/src/backend/optimizer/plan/setrefs.c b/src/backend/optimizer/plan/setrefs.c index 3b770fd30c..63ec89ba72 100644 --- a/src/backend/optimizer/plan/setrefs.c +++ b/src/backend/optimizer/plan/setrefs.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/setrefs.c,v 1.36 1999/02/03 20:15:39 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/plan/setrefs.c,v 1.37 1999/02/03 21:16:38 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -150,8 +150,7 @@ set_tempscan_tlist_references(SeqScan *tempscan) { Temp *temp = (Temp *) ((Plan *) tempscan)->lefttree; - ((Plan *) tempscan)->targetlist = - tlist_temp_references(temp->tempid, + ((Plan *) tempscan)->targetlist = tlist_temp_references(temp->tempid, ((Plan *) tempscan)->targetlist); set_temp_tlist_references(temp); } @@ -175,8 +174,7 @@ set_temp_tlist_references(Temp *temp) if (source != NULL) { set_tlist_references(source); - ((Plan *) temp)->targetlist = - copy_vars(((Plan *) temp)->targetlist, + ((Plan *) temp)->targetlist = copy_vars(((Plan *) temp)->targetlist, (source)->targetlist); } else @@ -307,8 +305,7 @@ replace_clause_joinvar_refs(Expr *clause, return (List *) clause; else if (and_clause((Node *) clause)) { - List *andclause = - replace_subclause_joinvar_refs(((Expr *) clause)->args, + List *andclause = replace_subclause_joinvar_refs(((Expr *) clause)->args, outer_tlist, inner_tlist); @@ -316,8 +313,7 @@ replace_clause_joinvar_refs(Expr *clause, } else if (or_clause((Node *) clause)) { - List *orclause = - replace_subclause_joinvar_refs(((Expr *) clause)->args, + List *orclause = replace_subclause_joinvar_refs(((Expr *) clause)->args, outer_tlist, inner_tlist); @@ -351,8 +347,7 @@ replace_clause_joinvar_refs(Expr *clause, } else if (is_funcclause((Node *) clause)) { - List *funcclause = - replace_subclause_joinvar_refs(((Expr *) clause)->args, + List *funcclause = replace_subclause_joinvar_refs(((Expr *) clause)->args, outer_tlist, inner_tlist); @@ -361,8 +356,7 @@ replace_clause_joinvar_refs(Expr *clause, } else if (not_clause((Node *) clause)) { - List *notclause = - replace_clause_joinvar_refs(get_notclausearg(clause), + List *notclause = replace_clause_joinvar_refs(get_notclausearg(clause), outer_tlist, inner_tlist); @@ -370,12 +364,10 @@ replace_clause_joinvar_refs(Expr *clause, } else if (is_opclause((Node *) clause)) { - Var *leftvar = - (Var *) replace_clause_joinvar_refs((Expr *) get_leftop(clause), + Var *leftvar = (Var *) replace_clause_joinvar_refs((Expr *) get_leftop(clause), outer_tlist, inner_tlist); - Var *rightvar = - (Var *) replace_clause_joinvar_refs((Expr *) get_rightop(clause), + Var *rightvar = (Var *) replace_clause_joinvar_refs((Expr *) get_rightop(clause), outer_tlist, inner_tlist); @@ -385,8 +377,7 @@ replace_clause_joinvar_refs(Expr *clause, } else if (is_subplan(clause)) { - ((Expr *) clause)->args = - replace_subclause_joinvar_refs(((Expr *) clause)->args, + ((Expr *) clause)->args = replace_subclause_joinvar_refs(((Expr *) clause)->args, outer_tlist, inner_tlist); ((SubPlan *) ((Expr *) clause)->oper)->sublink->oper = @@ -965,8 +956,7 @@ check_having_qual_for_vars(Node *clause, List *targetlist_so_far) } else if (IsA(clause, Aggref)) { - targetlist_so_far = - check_having_qual_for_vars(((Aggref *) clause)->target, targetlist_so_far); + targetlist_so_far = check_having_qual_for_vars(((Aggref *) clause)->target, targetlist_so_far); return targetlist_so_far; } else if (IsA(clause, ArrayRef)) diff --git a/src/backend/optimizer/plan/subselect.c b/src/backend/optimizer/plan/subselect.c index 9529f481d5..8c106eb48e 100644 --- a/src/backend/optimizer/plan/subselect.c +++ b/src/backend/optimizer/plan/subselect.c @@ -340,8 +340,7 @@ SS_replace_correlation_vars(Node *expr) } else if (IsA(expr, Iter)) { - ((Iter *) expr)->iterexpr = - SS_replace_correlation_vars(((Iter *) expr)->iterexpr); + ((Iter *) expr)->iterexpr = SS_replace_correlation_vars(((Iter *) expr)->iterexpr); } else if (single_node(expr)) return expr; @@ -350,22 +349,18 @@ SS_replace_correlation_vars(Node *expr) ((Expr *) expr)->args = (List *) SS_replace_correlation_vars((Node *) ((Expr *) expr)->args); else if (IsA(expr, Aggref)) - ((Aggref *) expr)->target = - SS_replace_correlation_vars((Node *) ((Aggref *) expr)->target); + ((Aggref *) expr)->target = SS_replace_correlation_vars((Node *) ((Aggref *) expr)->target); else if (IsA(expr, ArrayRef)) { ((ArrayRef *) expr)->refupperindexpr = (List *) SS_replace_correlation_vars((Node *) ((ArrayRef *) expr)->refupperindexpr); ((ArrayRef *) expr)->reflowerindexpr = (List *) SS_replace_correlation_vars((Node *) ((ArrayRef *) expr)->reflowerindexpr); - ((ArrayRef *) expr)->refexpr = - SS_replace_correlation_vars((Node *) ((ArrayRef *) expr)->refexpr); - ((ArrayRef *) expr)->refassgnexpr = - SS_replace_correlation_vars(((ArrayRef *) expr)->refassgnexpr); + ((ArrayRef *) expr)->refexpr = SS_replace_correlation_vars((Node *) ((ArrayRef *) expr)->refexpr); + ((ArrayRef *) expr)->refassgnexpr = SS_replace_correlation_vars(((ArrayRef *) expr)->refassgnexpr); } else if (IsA(expr, TargetEntry)) - ((TargetEntry *) expr)->expr = - SS_replace_correlation_vars((Node *) ((TargetEntry *) expr)->expr); + ((TargetEntry *) expr)->expr = SS_replace_correlation_vars((Node *) ((TargetEntry *) expr)->expr); else if (IsA(expr, SubLink)) { List *le; diff --git a/src/backend/optimizer/prep/prepqual.c b/src/backend/optimizer/prep/prepqual.c index 59ebbfd1cc..eed763422b 100644 --- a/src/backend/optimizer/prep/prepqual.c +++ b/src/backend/optimizer/prep/prepqual.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepqual.c,v 1.11 1998/10/04 03:30:56 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepqual.c,v 1.12 1999/02/03 21:16:44 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -384,8 +384,7 @@ push_nots(Expr *qual) 0, NULL); op->op_fcache = (FunctionCache *) NULL; - return - (make_opclause(op, get_leftop(qual), get_rightop(qual))); + return (make_opclause(op, get_leftop(qual), get_rightop(qual))); } else return make_notclause(qual); @@ -458,8 +457,7 @@ or_normalize(List *orlist) if (new_orlist) { - return - (or_normalize(lcons(distribute_args(lfirst(new_orlist), + return (or_normalize(lcons(distribute_args(lfirst(new_orlist), ((Expr *) distributable)->args), lnext(new_orlist)))); } diff --git a/src/backend/optimizer/prep/preptlist.c b/src/backend/optimizer/prep/preptlist.c index 73ed555ff5..5b31b2f578 100644 --- a/src/backend/optimizer/prep/preptlist.c +++ b/src/backend/optimizer/prep/preptlist.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/prep/preptlist.c,v 1.16 1998/09/01 04:29:57 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/prep/preptlist.c,v 1.17 1999/02/03 21:16:45 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -71,8 +71,7 @@ preprocess_targetlist(List *tlist, * order of the attributes. We also need to fill in the missing * attributes here. -ay 10/94 */ - expanded_tlist = - expand_targetlist(tlist, relid, command_type, result_relation); + expanded_tlist = expand_targetlist(tlist, relid, command_type, result_relation); /* XXX should the fix-opids be this early?? */ /* was mapCAR */ @@ -196,8 +195,7 @@ replace_matching_resname(List *new_tlist, List *old_tlist) if (matching_old_tl) { - matching_old_tl->resdom->resno = - new_tle->resdom->resno; + matching_old_tl->resdom->resno = new_tle->resdom->resno; t_list = lappend(t_list, matching_old_tl); } else @@ -307,8 +305,7 @@ new_relation_targetlist(Oid relid, Index rt_index, NodeTag node_type) Var *temp_var = (Var *) NULL; TargetEntry *temp_list = NULL; - temp_var = - makeVar(rt_index, attno, atttype, + temp_var = makeVar(rt_index, attno, atttype, get_atttypmod(relid, attno), 0, rt_index, attno); diff --git a/src/backend/optimizer/prep/prepunion.c b/src/backend/optimizer/prep/prepunion.c index 06f270e118..cbc91efd57 100644 --- a/src/backend/optimizer/prep/prepunion.c +++ b/src/backend/optimizer/prep/prepunion.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepunion.c,v 1.27 1998/09/01 04:29:59 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepunion.c,v 1.28 1999/02/03 21:16:46 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -222,8 +222,7 @@ plan_inherit_queries(Query *parse, Index rt_index) List *inheritrtable = NIL; List *union_relids = NIL; - union_relids = - find_all_inheritors(lconsi(rt_entry->relid, + union_relids = find_all_inheritors(lconsi(rt_entry->relid, NIL), NIL); @@ -442,8 +441,7 @@ fix_parsetree_attnums_nodes(Index rt_index, if (var->varno == rt_index && var->varattno != 0) { - var->varattno = - get_attnum(new_typeid, + var->varattno = get_attnum(new_typeid, get_attname(old_typeid, var->varattno)); } } diff --git a/src/backend/optimizer/util/clauseinfo.c b/src/backend/optimizer/util/clauseinfo.c index 915aa5b62e..4df034536c 100644 --- a/src/backend/optimizer/util/clauseinfo.c +++ b/src/backend/optimizer/util/clauseinfo.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/clauseinfo.c,v 1.10 1999/02/03 20:15:39 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/clauseinfo.c,v 1.11 1999/02/03 21:16:50 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -183,8 +183,7 @@ get_opnos(List *restrictinfo_list) foreach(i, restrictinfo_list) { temp = (RestrictInfo *) lfirst(i); - result = - lappendi(result, + result = lappendi(result, (((Oper *) temp->clause->oper)->opno)); } return result; diff --git a/src/backend/optimizer/util/clauses.c b/src/backend/optimizer/util/clauses.c index 6fc00c65cf..9df6b6a2a5 100644 --- a/src/backend/optimizer/util/clauses.c +++ b/src/backend/optimizer/util/clauses.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/util/clauses.c,v 1.27 1999/01/24 00:28:21 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/util/clauses.c,v 1.28 1999/02/03 21:16:51 momjian Exp $ * * HISTORY * AUTHOR DATE MAJOR EVENT @@ -83,8 +83,7 @@ make_clause(int type, Node *oper, List *args) bool is_opclause(Node *clause) { - return - (clause != NULL && + return (clause != NULL && nodeTag(clause) == T_Expr && ((Expr *) clause)->opType == OP_EXPR); } @@ -144,8 +143,7 @@ get_rightop(Expr *clause) static bool agg_clause(Node *clause) { - return - (clause != NULL && nodeTag(clause) == T_Aggref); + return (clause != NULL && nodeTag(clause) == T_Aggref); } /***************************************************************************** @@ -161,8 +159,7 @@ agg_clause(Node *clause) bool is_funcclause(Node *clause) { - return - (clause != NULL && + return (clause != NULL && nodeTag(clause) == T_Expr && ((Expr *) clause)->opType == FUNC_EXPR); } @@ -234,8 +231,7 @@ make_orclause(List *orclauses) bool not_clause(Node *clause) { - return - (clause != NULL && + return (clause != NULL && nodeTag(clause) == T_Expr && ((Expr *) clause)->opType == NOT_EXPR); } @@ -283,8 +279,7 @@ get_notclausearg(Expr *notclause) bool and_clause(Node *clause) { - return - (clause != NULL && + return (clause != NULL && nodeTag(clause) == T_Expr && ((Expr *) clause)->opType == AND_EXPR); } @@ -321,8 +316,7 @@ make_andclause(List *andclauses) bool case_clause(Node *clause) { - return - (clause != NULL && + return (clause != NULL && nodeTag(clause) == T_CaseExpr); } diff --git a/src/backend/optimizer/util/ordering.c b/src/backend/optimizer/util/ordering.c index f440f23080..d13e014b51 100644 --- a/src/backend/optimizer/util/ordering.c +++ b/src/backend/optimizer/util/ordering.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/ordering.c,v 1.8 1998/09/21 02:25:21 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/ordering.c,v 1.9 1999/02/03 21:16:51 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -43,22 +43,19 @@ equal_path_path_ordering(PathOrder *path_ordering1, else if (path_ordering1->ordtype == SORTOP_ORDER && path_ordering2->ordtype == SORTOP_ORDER) { - return - (equal_sortops_order(path_ordering1->ord.sortop, + return (equal_sortops_order(path_ordering1->ord.sortop, path_ordering2->ord.sortop)); } else if (path_ordering1->ordtype == MERGE_ORDER && path_ordering2->ordtype == SORTOP_ORDER) { return (path_ordering2->ord.sortop && - (path_ordering1->ord.merge->left_operator == - path_ordering2->ord.sortop[0])); + (path_ordering1->ord.merge->left_operator == path_ordering2->ord.sortop[0])); } else { return (path_ordering1->ord.sortop && - (path_ordering1->ord.sortop[0] == - path_ordering2->ord.merge->left_operator)); + (path_ordering1->ord.sortop[0] == path_ordering2->ord.merge->left_operator)); } } diff --git a/src/backend/optimizer/util/pathnode.c b/src/backend/optimizer/util/pathnode.c index 1c81550a94..55aa83875e 100644 --- a/src/backend/optimizer/util/pathnode.c +++ b/src/backend/optimizer/util/pathnode.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/util/pathnode.c,v 1.15 1999/02/03 20:15:42 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/util/pathnode.c,v 1.16 1999/02/03 21:16:52 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -212,8 +212,7 @@ create_seqscan_path(RelOptInfo * rel) * copy restrictinfo list into path for expensive function processing -- * JMH, 7/7/92 */ - pathnode->loc_restrictinfo = - (List *) copyObject((Node *) rel->restrictinfo); + pathnode->loc_restrictinfo = (List *) copyObject((Node *) rel->restrictinfo); if (rel->relids != NULL) relid = lfirsti(rel->relids); @@ -224,8 +223,7 @@ create_seqscan_path(RelOptInfo * rel) #if 0 if (XfuncMode != XFUNC_OFF) { - pathnode->path_cost += - xfunc_get_path_cost(pathnode); + pathnode->path_cost += xfunc_get_path_cost(pathnode); } #endif return pathnode; @@ -266,8 +264,7 @@ create_index_path(Query *root, * copy restrictinfo list into path for expensive function processing -- * JMH, 7/7/92 */ - pathnode->path.loc_restrictinfo = - set_difference((List *) copyObject((Node *) rel->restrictinfo), + pathnode->path.loc_restrictinfo = set_difference((List *) copyObject((Node *) rel->restrictinfo), (List *) restriction_clauses); /* @@ -301,8 +298,7 @@ create_index_path(Query *root, */ /* is the statement above really true? what about IndexScan as the inner of a join? */ - pathnode->path.path_cost = - cost_index(lfirsti(index->relids), + pathnode->path.path_cost = cost_index(lfirsti(index->relids), index->pages, 1.0, rel->pages, @@ -314,8 +310,7 @@ create_index_path(Query *root, #if 0 if (XfuncMode != XFUNC_OFF) { - pathnode->path_cost = - (pathnode->path_cost + + pathnode->path_cost = (pathnode->path_cost + xfunc_get_path_cost((Path *) pathnode)); } #endif @@ -366,8 +361,7 @@ create_index_path(Query *root, /* add in expensive functions cost! -- JMH, 7/7/92 */ if (XfuncMode != XFUNC_OFF) { - pathnode->path_cost += - xfunc_get_path_cost((Path *) pathnode); + pathnode->path_cost += xfunc_get_path_cost((Path *) pathnode); } #endif @@ -418,17 +412,14 @@ create_nestloop_path(RelOptInfo * joinrel, if (keys) { - pathnode->path.p_ordering.ordtype = - outer_path->p_ordering.ordtype; + pathnode->path.p_ordering.ordtype = outer_path->p_ordering.ordtype; if (outer_path->p_ordering.ordtype == SORTOP_ORDER) { - pathnode->path.p_ordering.ord.sortop = - outer_path->p_ordering.ord.sortop; + pathnode->path.p_ordering.ord.sortop = outer_path->p_ordering.ord.sortop; } else { - pathnode->path.p_ordering.ord.merge = - outer_path->p_ordering.ord.merge; + pathnode->path.p_ordering.ord.merge = outer_path->p_ordering.ord.merge; } } else @@ -437,8 +428,7 @@ create_nestloop_path(RelOptInfo * joinrel, pathnode->path.p_ordering.ord.sortop = NULL; } - pathnode->path.path_cost = - cost_nestloop(outer_path->path_cost, + pathnode->path.path_cost = cost_nestloop(outer_path->path_cost, inner_path->path_cost, outer_rel->size, inner_path->parent->size, @@ -500,8 +490,7 @@ create_mergejoin_path(RelOptInfo * joinrel, pathnode->jpath.path.loc_restrictinfo = NIL; pathnode->outersortkeys = outersortkeys; pathnode->innersortkeys = innersortkeys; - pathnode->jpath.path.path_cost = - cost_mergejoin(outer_path->path_cost, + pathnode->jpath.path.path_cost = cost_mergejoin(outer_path->path_cost, inner_path->path_cost, outersortkeys, innersortkeys, @@ -513,8 +502,7 @@ create_mergejoin_path(RelOptInfo * joinrel, #if 0 if (XfuncMode != XFUNC_OFF) { - pathnode->path_cost += - xfunc_get_path_cost((Path *) pathnode); + pathnode->path_cost += xfunc_get_path_cost((Path *) pathnode); } #endif return pathnode; @@ -569,8 +557,7 @@ create_hashjoin_path(RelOptInfo * joinrel, pathnode->path_hashclauses = hashclauses; pathnode->outerhashkeys = outerkeys; pathnode->innerhashkeys = innerkeys; - pathnode->jpath.path.path_cost = - cost_hashjoin(outer_path->path_cost, + pathnode->jpath.path.path_cost = cost_hashjoin(outer_path->path_cost, inner_path->path_cost, outerkeys, innerkeys, @@ -580,8 +567,7 @@ create_hashjoin_path(RelOptInfo * joinrel, #if 0 if (XfuncMode != XFUNC_OFF) { - pathnode->path_cost += - xfunc_get_path_cost((Path *) pathnode); + pathnode->path_cost += xfunc_get_path_cost((Path *) pathnode); } #endif return pathnode; diff --git a/src/backend/optimizer/util/plancat.c b/src/backend/optimizer/util/plancat.c index f7e4ea456c..0a85255394 100644 --- a/src/backend/optimizer/util/plancat.c +++ b/src/backend/optimizer/util/plancat.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/util/plancat.c,v 1.23 1998/10/08 18:29:30 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/util/plancat.c,v 1.24 1999/02/03 21:16:52 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -219,8 +219,7 @@ index_info(Query *root, bool first, int relid, IdxInfoRetval *info) if (!HeapTupleIsValid(amopTuple)) elog(ERROR, "index_info: no amop %d %d %d", relam, index->indclass[i], amstrategy); - info->orderOprs[i] = - ((Form_pg_amop) GETSTRUCT(amopTuple))->amopopr; + info->orderOprs[i] = ((Form_pg_amop) GETSTRUCT(amopTuple))->amopopr; } return TRUE; } diff --git a/src/backend/optimizer/util/tlist.c b/src/backend/optimizer/util/tlist.c index db3281dfa3..1b8ea80e19 100644 --- a/src/backend/optimizer/util/tlist.c +++ b/src/backend/optimizer/util/tlist.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/optimizer/util/tlist.c,v 1.22 1999/01/24 00:28:22 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/optimizer/util/tlist.c,v 1.23 1999/02/03 21:16:54 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -113,8 +113,7 @@ add_tl_element(RelOptInfo * rel, Var *var) var->varno, var->varoattno); - rel->targetlist = - lappend(tlist, + rel->targetlist = lappend(tlist, create_tl_element(newvar, length(tlist) + 1)); @@ -462,8 +461,7 @@ flatten_tlistentry(Node *tlistentry, List *flat_tlist) } else if (IsA(tlistentry, Iter)) { - ((Iter *) tlistentry)->iterexpr = - flatten_tlistentry((Node *) ((Iter *) tlistentry)->iterexpr, + ((Iter *) tlistentry)->iterexpr = flatten_tlistentry((Node *) ((Iter *) tlistentry)->iterexpr, flat_tlist); return tlistentry; } diff --git a/src/backend/parser/parse_expr.c b/src/backend/parser/parse_expr.c index 894ab9b498..6de507bae0 100644 --- a/src/backend/parser/parse_expr.c +++ b/src/backend/parser/parse_expr.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.39 1999/01/24 00:28:29 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.40 1999/02/03 21:16:57 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -295,8 +295,7 @@ transformExpr(ParseState *pstate, Node *expr, int precedence) foreach(llist, left_expr) lfirst(llist) = transformExpr(pstate, lfirst(llist), precedence); - if (length(left_expr) != - length(right_expr)) + if (length(left_expr) != length(right_expr)) elog(ERROR, "parser: Subselect has too many or too few fields."); if (length(left_expr) > 1 && @@ -520,8 +519,7 @@ transformIdent(ParseState *pstate, Node *expr, int precedence) /* we add the relation name for them */ att->relname = rte->refname; att->attrs = lcons(makeString(ident->name), NIL); - column_result = - (Node *) ParseNestedFuncOrColumn(pstate, att, &pstate->p_last_resno, + column_result = (Node *) ParseNestedFuncOrColumn(pstate, att, &pstate->p_last_resno, precedence); } @@ -731,8 +729,7 @@ parser_typecast2(Node *expr, Oid exprType, Type tp, int32 atttypmod) break; case FLOAT4OID: /* float4 */ { - float32 floatVal = - DatumGetFloat32(((Const *) expr)->constvalue); + float32 floatVal = DatumGetFloat32(((Const *) expr)->constvalue); const_string = (char *) palloc(256); string_palloced = true; @@ -741,8 +738,7 @@ parser_typecast2(Node *expr, Oid exprType, Type tp, int32 atttypmod) } case FLOAT8OID: /* float8 */ { - float64 floatVal = - DatumGetFloat64(((Const *) expr)->constvalue); + float64 floatVal = DatumGetFloat64(((Const *) expr)->constvalue); const_string = (char *) palloc(256); string_palloced = true; @@ -756,13 +752,11 @@ parser_typecast2(Node *expr, Oid exprType, Type tp, int32 atttypmod) (long) ((Const *) expr)->constvalue); break; case TEXTOID: /* text */ - const_string = - DatumGetPointer(((Const *) expr)->constvalue); + const_string = DatumGetPointer(((Const *) expr)->constvalue); const_string = (char *) textout((struct varlena *) const_string); break; case UNKNOWNOID: /* unknown */ - const_string = - DatumGetPointer(((Const *) expr)->constvalue); + const_string = DatumGetPointer(((Const *) expr)->constvalue); const_string = (char *) textout((struct varlena *) const_string); break; default: diff --git a/src/backend/parser/parse_func.c b/src/backend/parser/parse_func.c index 594b705b67..c0bc9912d8 100644 --- a/src/backend/parser/parse_func.c +++ b/src/backend/parser/parse_func.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.36 1998/12/23 14:38:40 thomas Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.37 1999/02/03 21:16:58 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -463,8 +463,7 @@ ParseFuncOrColumn(ParseState *pstate, char *funcname, List *fargs, */ toid = typeTypeId(typenameType(relname)); /* replace it in the arg list */ - lfirst(fargs) = - makeVar(vnum, 0, toid, -1, 0, vnum, 0); + lfirst(fargs) = makeVar(vnum, 0, toid, -1, 0, vnum, 0); } else if (!attisset) { /* set functions don't have parameters */ @@ -554,8 +553,7 @@ ParseFuncOrColumn(ParseState *pstate, char *funcname, List *fargs, { if (!strcmp(funcname, "*")) { - funcnode->func_tlist = - expandAll(pstate, relname, refname, curr_resno); + funcnode->func_tlist = expandAll(pstate, relname, refname, curr_resno); } else { @@ -697,8 +695,7 @@ func_get_candidates(char *funcname, int nargs) palloc(8 * sizeof(Oid)); MemSet(current_candidate->args, 0, 8 * sizeof(Oid)); for (i = 0; i < nargs; i++) - current_candidate->args[i] = - pgProcP->proargtypes[i]; + current_candidate->args[i] = pgProcP->proargtypes[i]; current_candidate->next = candidates; candidates = current_candidate; @@ -1003,8 +1000,7 @@ func_get_detail(char *funcname, } current_input_typeids = *input_typeid_vector++; } - while (current_input_typeids != - InvalidOid && ncandidates == 0); + while (current_input_typeids != InvalidOid && ncandidates == 0); } } @@ -1292,8 +1288,7 @@ make_arguments(ParseState *pstate, */ if (input_typeids[i] == UNKNOWNOID && function_typeids[i] != InvalidOid) { - lfirst(current_fargs) = - parser_typecast2(lfirst(current_fargs), + lfirst(current_fargs) = parser_typecast2(lfirst(current_fargs), input_typeids[i], typeidType(function_typeids[i]), -1); @@ -1420,8 +1415,7 @@ ParseComplexProjection(ParseState *pstate, } if (RelationIsValid(rd)) { - func->func_tlist = - setup_tlist(funcname, argrelid); + func->func_tlist = setup_tlist(funcname, argrelid); iter->itertype = attnumTypeId(rd, attnum); return (Node *) iter; } @@ -1480,8 +1474,7 @@ ParseComplexProjection(ParseState *pstate, { Expr *newexpr; - funcnode->func_tlist = - setup_tlist(funcname, argrelid); + funcnode->func_tlist = setup_tlist(funcname, argrelid); funcnode->functype = attnumTypeId(rd, attnum); newexpr = makeNode(Expr); diff --git a/src/backend/parser/parse_target.c b/src/backend/parser/parse_target.c index c400ef89bc..b2a2af64ad 100644 --- a/src/backend/parser/parse_target.c +++ b/src/backend/parser/parse_target.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/parser/parse_target.c,v 1.33 1999/01/24 00:28:30 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/parser/parse_target.c,v 1.34 1999/02/03 21:16:59 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -612,8 +612,7 @@ transformTargetList(ParseState *pstate, List *targetlist) p_target = tail_p_target = expandAll(pstate, att->relname, att->relname, &pstate->p_last_resno); else - lnext(tail_p_target) = - expandAll(pstate, att->relname, att->relname, + lnext(tail_p_target) = expandAll(pstate, att->relname, att->relname, &pstate->p_last_resno); expand_star = true; } diff --git a/src/backend/port/snprintf.c b/src/backend/port/snprintf.c index b2646a6d58..7c7a9105a3 100644 --- a/src/backend/port/snprintf.c +++ b/src/backend/port/snprintf.c @@ -73,7 +73,7 @@ typedef unsigned long long ulong_long; * causing nast effects. **************************************************************/ -/*static char _id[] = "$Id: snprintf.c,v 1.18 1999/01/17 21:44:46 tgl Exp $";*/ +/*static char _id[] = "$Id: snprintf.c,v 1.19 1999/02/03 21:17:00 momjian Exp $";*/ static char *end; static int SnprfOverflow; @@ -380,8 +380,7 @@ int base, } do { - convert[place++] = - (caps ? "0123456789ABCDEF" : "0123456789abcdef") + convert[place++] = (caps ? "0123456789ABCDEF" : "0123456789abcdef") [uvalue % (unsigned) base]; uvalue = (uvalue / (unsigned) base); } while (uvalue); diff --git a/src/backend/rewrite/rewriteHandler.c b/src/backend/rewrite/rewriteHandler.c index 31b9a43694..39db238704 100644 --- a/src/backend/rewrite/rewriteHandler.c +++ b/src/backend/rewrite/rewriteHandler.c @@ -6,7 +6,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteHandler.c,v 1.33 1999/02/02 03:44:45 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteHandler.c,v 1.34 1999/02/03 21:17:04 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -2492,11 +2492,9 @@ RewriteQuery(Query *parsetree, bool *instead_flag, List **qual_products) if (rt_entry_locks != NULL) { - List *locks = - matchLocks(event, rt_entry_locks, result_relation, parsetree); + List *locks = matchLocks(event, rt_entry_locks, result_relation, parsetree); - product_queries = - fireRules(parsetree, + product_queries = fireRules(parsetree, result_relation, event, instead_flag, diff --git a/src/backend/rewrite/rewriteManip.c b/src/backend/rewrite/rewriteManip.c index 2042080d0b..a495be8b1f 100644 --- a/src/backend/rewrite/rewriteManip.c +++ b/src/backend/rewrite/rewriteManip.c @@ -6,7 +6,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteManip.c,v 1.26 1999/01/25 18:02:22 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteManip.c,v 1.27 1999/02/03 21:17:07 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -503,8 +503,7 @@ AddQual(Query *parsetree, Node *qual) if (old == NULL) parsetree->qual = copy; else - parsetree->qual = - (Node *) make_andclause(makeList(parsetree->qual, copy, -1)); + parsetree->qual = (Node *) make_andclause(makeList(parsetree->qual, copy, -1)); } /* Adds the given havingQual to the one already contained in the parsetree just as @@ -526,8 +525,7 @@ AddHavingQual(Query *parsetree, Node *havingQual) if (old == NULL) parsetree->havingQual = copy; else - parsetree->havingQual = - (Node *) make_andclause(makeList(parsetree->havingQual, copy, -1)); + parsetree->havingQual = (Node *) make_andclause(makeList(parsetree->havingQual, copy, -1)); } void diff --git a/src/backend/rewrite/rewriteSupport.c b/src/backend/rewrite/rewriteSupport.c index 15a9b18b90..d8603701dc 100644 --- a/src/backend/rewrite/rewriteSupport.c +++ b/src/backend/rewrite/rewriteSupport.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteSupport.c,v 1.30 1998/12/15 12:46:18 vadim Exp $ + * $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteSupport.c,v 1.31 1999/02/03 21:17:08 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -203,8 +203,7 @@ prs2_addToRelation(Oid relid, numlock = rulelock->numLocks; /* expand, for safety reasons */ oldcxt = MemoryContextSwitchTo((MemoryContext) CacheCxt); - rulelock->rules = - (RewriteRule **) repalloc(rulelock->rules, + rulelock->rules = (RewriteRule **) repalloc(rulelock->rules, sizeof(RewriteRule *) * (numlock + 1)); MemoryContextSwitchTo(oldcxt); rulelock->rules[numlock] = thisRule; diff --git a/src/backend/storage/buffer/bufmgr.c b/src/backend/storage/buffer/bufmgr.c index 96232c9d79..404b28e562 100644 --- a/src/backend/storage/buffer/bufmgr.c +++ b/src/backend/storage/buffer/bufmgr.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.46 1999/02/02 03:44:46 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.47 1999/02/03 21:17:09 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -1373,8 +1373,7 @@ BufferReplace(BufferDesc *bufHdr, bool bufferLockHeld) BlockNumber RelationGetNumberOfBlocks(Relation relation) { - return - ((relation->rd_myxactonly) ? relation->rd_nblocks : + return ((relation->rd_myxactonly) ? relation->rd_nblocks : smgrnblocks(DEFAULT_SMGR, relation)); } diff --git a/src/backend/storage/buffer/localbuf.c b/src/backend/storage/buffer/localbuf.c index e08450da85..f4be40723f 100644 --- a/src/backend/storage/buffer/localbuf.c +++ b/src/backend/storage/buffer/localbuf.c @@ -15,7 +15,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/storage/buffer/localbuf.c,v 1.19 1998/08/19 02:02:37 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/storage/buffer/localbuf.c,v 1.20 1999/02/03 21:17:12 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -245,8 +245,7 @@ InitLocalBuffer(void) buf->buf_id = -i - 2; } - LocalRefCount = - (long *) malloc(sizeof(long) * NLocBuffer); + LocalRefCount = (long *) malloc(sizeof(long) * NLocBuffer); MemSet(LocalRefCount, 0, sizeof(long) * NLocBuffer); } diff --git a/src/backend/storage/file/fd.c b/src/backend/storage/file/fd.c index d8b95b32f0..36db311540 100644 --- a/src/backend/storage/file/fd.c +++ b/src/backend/storage/file/fd.c @@ -6,7 +6,7 @@ * Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $Id: fd.c,v 1.35 1998/10/26 01:00:13 tgl Exp $ + * $Id: fd.c,v 1.36 1999/02/03 21:17:14 momjian Exp $ * * NOTES: * @@ -235,10 +235,8 @@ Delete(File file) fileP = &VfdCache[file]; - VfdCache[fileP->lruLessRecently].lruMoreRecently = - VfdCache[file].lruMoreRecently; - VfdCache[fileP->lruMoreRecently].lruLessRecently = - VfdCache[file].lruLessRecently; + VfdCache[fileP->lruLessRecently].lruMoreRecently = VfdCache[file].lruMoreRecently; + VfdCache[fileP->lruMoreRecently].lruLessRecently = VfdCache[file].lruLessRecently; DO_DB(_dump_lru()); } @@ -347,8 +345,7 @@ tryAgain: /* seek to the right position */ if (vfdP->seekPos != 0L) { - returnValue = - lseek(vfdP->fd, vfdP->seekPos, SEEK_SET); + returnValue = lseek(vfdP->fd, vfdP->seekPos, SEEK_SET); Assert(returnValue != -1); } @@ -751,8 +748,7 @@ FileSeek(File file, long offset, int whence) return VfdCache[file].seekPos; case SEEK_END: FileAccess(file); - returnCode = VfdCache[file].seekPos = - lseek(VfdCache[file].fd, offset, whence); + returnCode = VfdCache[file].seekPos = lseek(VfdCache[file].fd, offset, whence); return returnCode; default: elog(ERROR, "FileSeek: invalid whence: %d", whence); @@ -761,8 +757,7 @@ FileSeek(File file, long offset, int whence) } else { - returnCode = VfdCache[file].seekPos = - lseek(VfdCache[file].fd, offset, whence); + returnCode = VfdCache[file].seekPos = lseek(VfdCache[file].fd, offset, whence); return returnCode; } /* NOTREACHED */ diff --git a/src/backend/storage/ipc/shmem.c b/src/backend/storage/ipc/shmem.c index 979a3ebe96..d09c2f6dd9 100644 --- a/src/backend/storage/ipc/shmem.c +++ b/src/backend/storage/ipc/shmem.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/storage/ipc/shmem.c,v 1.34 1998/12/18 09:10:34 vadim Exp $ + * $Header: /cvsroot/pgsql/src/backend/storage/ipc/shmem.c,v 1.35 1999/02/03 21:17:16 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -189,8 +189,7 @@ InitShmem(unsigned int key, unsigned int size) /* next is ShmemVariableCache */ ShmemVariableCache = (VariableCache) (ShmemIndexOffset + 1); - currFreeSpace += - sizeof(ShmemFreeStart) + sizeof(ShmemIndexOffset) + + currFreeSpace += sizeof(ShmemFreeStart) + sizeof(ShmemIndexOffset) + LONGALIGN(sizeof(VariableCacheData)); /* @@ -360,8 +359,7 @@ ShmemInitHash(char *name, /* table string name for shmem index */ hash_flags |= HASH_SHARED_MEM; /* look it up in the shmem index */ - location = - ShmemInitStruct(name, my_log2(max_size) + sizeof(HHDR), &found); + location = ShmemInitStruct(name, my_log2(max_size) + sizeof(HHDR), &found); /* * shmem index is corrupted. Let someone else give the error diff --git a/src/backend/storage/large_object/inv_api.c b/src/backend/storage/large_object/inv_api.c index 7e2a0b3723..2802a16c13 100644 --- a/src/backend/storage/large_object/inv_api.c +++ b/src/backend/storage/large_object/inv_api.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/storage/large_object/inv_api.c,v 1.46 1999/02/02 03:44:50 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/storage/large_object/inv_api.c,v 1.47 1999/02/03 21:17:20 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -192,8 +192,7 @@ inv_create(int flags) retval->iscan = (IndexScanDesc) NULL; retval->hdesc = RelationGetDescr(r); retval->idesc = RelationGetDescr(indr); - retval->offset = retval->lowbyte = - retval->highbyte = 0; + retval->offset = retval->lowbyte = retval->highbyte = 0; ItemPointerSetInvalid(&(retval->htid)); if (flags & INV_WRITE) @@ -631,8 +630,7 @@ inv_fetchtup(LargeObjectDesc *obj_desc, HeapTuple tuple, Buffer *buffer) */ ScanKeyEntryInitialize(&skey, 0x0, 1, F_INT4GE, Int32GetDatum(obj_desc->offset)); - obj_desc->iscan = - index_beginscan(obj_desc->index_r, + obj_desc->iscan = index_beginscan(obj_desc->index_r, (bool) 0, (uint16) 1, &skey); } diff --git a/src/backend/utils/adt/acl.c b/src/backend/utils/adt/acl.c index 15c590dc81..5e862ea6ef 100644 --- a/src/backend/utils/adt/acl.c +++ b/src/backend/utils/adt/acl.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/acl.c,v 1.31 1998/09/01 04:32:23 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/acl.c,v 1.32 1999/02/03 21:17:24 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -445,16 +445,13 @@ aclinsert3(Acl *old_acl, AclItem *mod_aip, unsigned modechg) switch (modechg) { case ACL_MODECHG_ADD: - new_aip[dst].ai_mode = - old_aip[src].ai_mode | mod_aip->ai_mode; + new_aip[dst].ai_mode = old_aip[src].ai_mode | mod_aip->ai_mode; break; case ACL_MODECHG_DEL: - new_aip[dst].ai_mode = - old_aip[src].ai_mode & ~mod_aip->ai_mode; + new_aip[dst].ai_mode = old_aip[src].ai_mode & ~mod_aip->ai_mode; break; case ACL_MODECHG_EQL: - new_aip[dst].ai_mode = - mod_aip->ai_mode; + new_aip[dst].ai_mode = mod_aip->ai_mode; break; } diff --git a/src/backend/utils/adt/arrayfuncs.c b/src/backend/utils/adt/arrayfuncs.c index b718ce0136..4cf840cfa9 100644 --- a/src/backend/utils/adt/arrayfuncs.c +++ b/src/backend/utils/adt/arrayfuncs.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.36 1999/01/17 21:12:55 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.37 1999/02/03 21:17:26 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -196,8 +196,7 @@ array_in(char *string, /* input array in external form */ if (*p == '{') { /* array not a large object */ - dataPtr = - (char *) _ReadArrayStr(p, nitems, ndim, dim, &inputproc, typelem, + dataPtr = (char *) _ReadArrayStr(p, nitems, ndim, dim, &inputproc, typelem, typmod, typdelim, typlen, typbyval, typalign, &nbytes); nbytes += ARR_OVERHEAD(ndim); diff --git a/src/backend/utils/adt/inet_net_pton.c b/src/backend/utils/adt/inet_net_pton.c index bd07e32fd2..ae3036c3ca 100644 --- a/src/backend/utils/adt/inet_net_pton.c +++ b/src/backend/utils/adt/inet_net_pton.c @@ -16,7 +16,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static const char rcsid[] = "$Id: inet_net_pton.c,v 1.6 1998/10/22 13:16:26 momjian Exp $"; +static const char rcsid[] = "$Id: inet_net_pton.c,v 1.7 1999/02/03 21:17:27 momjian Exp $"; #endif @@ -113,6 +113,7 @@ inet_cidr_pton_ipv4(const char *src, u_char *dst, size_t size) if (size <= 0) goto emsgsize; dirty = 0; + tmp = 0; src++; /* skip x or X. */ while ((ch = *src++) != '\0' && isascii(ch) && isxdigit(ch)) { if (isupper(ch)) diff --git a/src/backend/utils/adt/regexp.c b/src/backend/utils/adt/regexp.c index 6efb350266..bb24dff2e8 100644 --- a/src/backend/utils/adt/regexp.c +++ b/src/backend/utils/adt/regexp.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/adt/regexp.c,v 1.20 1998/09/01 04:32:46 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/adt/regexp.c,v 1.21 1999/02/03 21:17:28 momjian Exp $ * * Alistair Crooks added the code for the regex caching * agc - cached the regular expressions used - there's a good chance @@ -108,8 +108,7 @@ RE_compile_and_execute(struct varlena * text_re, char *text, int cflags) { for (lru = i = 0; i < rec; i++) { - rev[i].cre_lru = - (rev[i].cre_lru - rev[oldest].cre_lru) / 2; + rev[i].cre_lru = (rev[i].cre_lru - rev[oldest].cre_lru) / 2; if (rev[i].cre_lru > lru) lru = rev[i].cre_lru; } diff --git a/src/backend/utils/cache/catcache.c b/src/backend/utils/cache/catcache.c index 0c431edc6d..0c682918ab 100644 --- a/src/backend/utils/cache/catcache.c +++ b/src/backend/utils/cache/catcache.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/cache/catcache.c,v 1.37 1999/02/02 03:44:58 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/cache/catcache.c,v 1.38 1999/02/03 21:17:30 momjian Exp $ * * Notes: * XXX This needs to use exception.h to handle recovery when @@ -210,8 +210,7 @@ CatalogCacheInitializeCache(struct catcache * cache, else cache->cc_klen[i] = tupdesc->attrs[cache->cc_key[i] - 1]->attlen; - cache->cc_skey[i].sk_procedure = - EQPROC(tupdesc->attrs[cache->cc_key[i] - 1]->atttypid); + cache->cc_skey[i].sk_procedure = EQPROC(tupdesc->attrs[cache->cc_key[i] - 1]->atttypid); fmgr_info(cache->cc_skey[i].sk_procedure, &cache->cc_skey[i].sk_func); @@ -429,8 +428,7 @@ CatalogCacheComputeTupleHashIndex(struct catcache * cacheInOutP, break; } - return - CatalogCacheComputeHashIndex(cacheInOutP); + return CatalogCacheComputeHashIndex(cacheInOutP); } /* -------------------------------- diff --git a/src/backend/utils/cache/fcache.c b/src/backend/utils/cache/fcache.c index 08db222196..5aa6393d96 100644 --- a/src/backend/utils/cache/fcache.c +++ b/src/backend/utils/cache/fcache.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/cache/Attic/fcache.c,v 1.19 1998/11/27 19:52:27 vadim Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/cache/Attic/fcache.c,v 1.20 1999/02/03 21:17:31 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -219,8 +219,7 @@ init_fcache(Oid foid, int i; List *oneArg; - retval->argOidVect = - (Oid *) palloc(retval->nargs * sizeof(Oid)); + retval->argOidVect = (Oid *) palloc(retval->nargs * sizeof(Oid)); argTypes = procedureStruct->proargtypes; memmove(retval->argOidVect, argTypes, diff --git a/src/backend/utils/cache/inval.c b/src/backend/utils/cache/inval.c index 844ea968d6..7c0d5363e3 100644 --- a/src/backend/utils/cache/inval.c +++ b/src/backend/utils/cache/inval.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/cache/inval.c,v 1.19 1999/02/02 03:45:01 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/cache/inval.c,v 1.20 1999/02/03 21:17:32 momjian Exp $ * * Note - this code is real crufty... * @@ -117,7 +117,7 @@ LocalInvalidRegister(LocalInvalid invalid, Assert(PointerIsValid(entry)); ((InvalidationUserData *) entry)->dataP[-1] = - (InvalidationUserData *) invalid; + (InvalidationUserData *) invalid; return entry; } diff --git a/src/backend/utils/cache/lsyscache.c b/src/backend/utils/cache/lsyscache.c index e804f5aa1c..1acdab4af7 100644 --- a/src/backend/utils/cache/lsyscache.c +++ b/src/backend/utils/cache/lsyscache.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/cache/lsyscache.c,v 1.22 1998/09/01 04:33:01 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/cache/lsyscache.c,v 1.23 1999/02/03 21:17:33 momjian Exp $ * * NOTES * Eventually, the index information should go through here, too. @@ -477,8 +477,7 @@ get_typalign(Oid typid) struct varlena * get_typdefault(Oid typid) { - struct varlena *typdefault = - (struct varlena *) TypeDefaultRetrieve(typid); + struct varlena *typdefault = (struct varlena *) TypeDefaultRetrieve(typid); return typdefault; } diff --git a/src/backend/utils/cache/relcache.c b/src/backend/utils/cache/relcache.c index 4babd01289..dbad63334c 100644 --- a/src/backend/utils/cache/relcache.c +++ b/src/backend/utils/cache/relcache.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.56 1999/02/02 03:45:02 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.57 1999/02/03 21:17:34 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -713,25 +713,20 @@ RelationBuildRuleLock(Relation relation) rule->ruleId = pg_rewrite_tuple->t_data->t_oid; - rule->event = - (int) heap_getattr(pg_rewrite_tuple, + rule->event = (int) heap_getattr(pg_rewrite_tuple, Anum_pg_rewrite_ev_type, pg_rewrite_tupdesc, &isnull) - 48; - rule->attrno = - (int) heap_getattr(pg_rewrite_tuple, + rule->attrno = (int) heap_getattr(pg_rewrite_tuple, Anum_pg_rewrite_ev_attr, pg_rewrite_tupdesc, &isnull); - rule->isInstead = - !!heap_getattr(pg_rewrite_tuple, + rule->isInstead = !!heap_getattr(pg_rewrite_tuple, Anum_pg_rewrite_is_instead, pg_rewrite_tupdesc, &isnull); - ruleaction = - heap_getattr(pg_rewrite_tuple, + ruleaction = heap_getattr(pg_rewrite_tuple, Anum_pg_rewrite_ev_action, pg_rewrite_tupdesc, &isnull); - rule_evqual_string = - heap_getattr(pg_rewrite_tuple, + rule_evqual_string = heap_getattr(pg_rewrite_tuple, Anum_pg_rewrite_ev_qual, pg_rewrite_tupdesc, &isnull); @@ -745,8 +740,7 @@ RelationBuildRuleLock(Relation relation) if (numlocks == maxlocks) { maxlocks *= 2; - rules = - (RewriteRule **) repalloc(rules, sizeof(RewriteRule *) * maxlocks); + rules = (RewriteRule **) repalloc(rules, sizeof(RewriteRule *) * maxlocks); } } @@ -1035,8 +1029,7 @@ formrdesc(char *relationName, if (IsSystemRelationName(relationName)) { relation->rd_rel->relowner = 6; /* XXX use sym const */ - relation->rd_rel->relisshared = - IsSharedSystemRelationName(relationName); + relation->rd_rel->relisshared = IsSharedSystemRelationName(relationName); } else { @@ -1056,8 +1049,7 @@ formrdesc(char *relationName, */ for (i = 0; i < natts; i++) { - relation->rd_att->attrs[i] = - (Form_pg_attribute) palloc(ATTRIBUTE_TUPLE_SIZE); + relation->rd_att->attrs[i] = (Form_pg_attribute) palloc(ATTRIBUTE_TUPLE_SIZE); MemSet((char *) relation->rd_att->attrs[i], 0, ATTRIBUTE_TUPLE_SIZE); diff --git a/src/backend/utils/cache/syscache.c b/src/backend/utils/cache/syscache.c index 25b3e0a430..fe4e4c59c8 100644 --- a/src/backend/utils/cache/syscache.c +++ b/src/backend/utils/cache/syscache.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/cache/syscache.c,v 1.22 1998/09/01 04:33:03 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/cache/syscache.c,v 1.23 1999/02/03 21:17:35 momjian Exp $ * * NOTES * These routines allow the parser/planner/executor to perform @@ -420,8 +420,7 @@ InitCatalogCache() Assert(!PointerIsValid((Pointer) SysCache[cacheId])); - SysCache[cacheId] = - InitSysCache(cacheinfo[cacheId].name, + SysCache[cacheId] = InitSysCache(cacheinfo[cacheId].name, cacheinfo[cacheId].indname, cacheId, cacheinfo[cacheId].nkeys, @@ -492,8 +491,7 @@ SearchSysCacheTuple(int cacheId,/* cache selection code */ if (!PointerIsValid(SysCache[cacheId])) { - SysCache[cacheId] = - InitSysCache(cacheinfo[cacheId].name, + SysCache[cacheId] = InitSysCache(cacheinfo[cacheId].name, cacheinfo[cacheId].indname, cacheId, cacheinfo[cacheId].nkeys, @@ -604,10 +602,8 @@ SearchSysCacheGetAttribute(int cacheId, else if (attributeNumber > 0 && attributeNumber <= relation->rd_rel->relnatts) { - attributeLength = - relation->rd_att->attrs[attributeNumber - 1]->attlen; - attributeByValue = - relation->rd_att->attrs[attributeNumber - 1]->attbyval; + attributeLength = relation->rd_att->attrs[attributeNumber - 1]->attlen; + attributeByValue = relation->rd_att->attrs[attributeNumber - 1]->attbyval; } else { diff --git a/src/backend/utils/fmgr/fmgr.c b/src/backend/utils/fmgr/fmgr.c index 0103350339..2b9f5bbb34 100644 --- a/src/backend/utils/fmgr/fmgr.c +++ b/src/backend/utils/fmgr/fmgr.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/fmgr/fmgr.c,v 1.20 1998/09/01 04:33:10 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/fmgr/fmgr.c,v 1.21 1999/02/03 21:17:35 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -190,8 +190,7 @@ fmgr_info(Oid procedureId, FmgrInfo *finfo) switch (language) { case INTERNALlanguageId: - finfo->fn_addr = - fmgr_lookupByName(procedureStruct->proname.data); + finfo->fn_addr = fmgr_lookupByName(procedureStruct->proname.data); if (!finfo->fn_addr) elog(ERROR, "fmgr_info: function %s: not in internal table", procedureStruct->proname.data); @@ -342,8 +341,7 @@ fmgr_array_args(Oid procedureId, int nargs, char *args[], bool *isNull) finfo.fn_nargs = nargs; /* XXX see WAY_COOL_ORTHOGONAL_FUNCTIONS */ - return - (fmgr_c(&finfo, + return (fmgr_c(&finfo, (FmgrValues *) args, isNull)); } diff --git a/src/backend/utils/hash/dynahash.c b/src/backend/utils/hash/dynahash.c index ecf87b08f5..f396973634 100644 --- a/src/backend/utils/hash/dynahash.c +++ b/src/backend/utils/hash/dynahash.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/hash/dynahash.c,v 1.16 1998/09/01 04:33:11 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/hash/dynahash.c,v 1.17 1999/02/03 21:17:38 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -329,8 +329,7 @@ init_htab(HTAB *hashp, int nelem) /* allocate a directory */ if (!(hashp->dir)) { - hashp->dir = - (SEG_OFFSET *) hashp->alloc(hctl->dsize * sizeof(SEG_OFFSET)); + hashp->dir = (SEG_OFFSET *) hashp->alloc(hctl->dsize * sizeof(SEG_OFFSET)); if (!hashp->dir) return -1; } @@ -850,8 +849,7 @@ bucket_alloc(HTAB *hashp) BUCKET_INDEX tmpIndex, lastIndex; - bucketSize = - sizeof(BUCKET_INDEX) + hashp->hctl->keysize + hashp->hctl->datasize; + bucketSize = sizeof(BUCKET_INDEX) + hashp->hctl->keysize + hashp->hctl->datasize; /* make sure its aligned correctly */ bucketSize += sizeof(long *) - (bucketSize % sizeof(long *)); diff --git a/src/backend/utils/mmgr/portalmem.c b/src/backend/utils/mmgr/portalmem.c index f369c4359c..c6c31bc181 100644 --- a/src/backend/utils/mmgr/portalmem.c +++ b/src/backend/utils/mmgr/portalmem.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/utils/mmgr/portalmem.c,v 1.15 1999/01/01 04:48:47 momjian Exp $ + * $Header: /cvsroot/pgsql/src/backend/utils/mmgr/portalmem.c,v 1.16 1999/02/03 21:17:40 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -883,8 +883,7 @@ StartPortalAllocMode(AllocMode mode, Size limit) FixedStackPush(&context->stackData, context->block); /* allocate and initialize new block */ - context->block = - MemoryContextAlloc( + context->block = MemoryContextAlloc( (MemoryContext) PortalHeapMemoryGetVariableMemory(context), sizeof(HeapMemoryBlockData)); diff --git a/src/backend/utils/sort/psort.c b/src/backend/utils/sort/psort.c index 9d6a9f3664..abb1c579d2 100644 --- a/src/backend/utils/sort/psort.c +++ b/src/backend/utils/sort/psort.c @@ -4,7 +4,7 @@ * * Copyright (c) 1994, Regents of the University of California * - * $Id: psort.c,v 1.48 1999/02/02 03:45:12 momjian Exp $ + * $Id: psort.c,v 1.49 1999/02/03 21:17:42 momjian Exp $ * * NOTES * Sorts the first relation into the second relation. @@ -134,8 +134,7 @@ psort_begin(Sort *node, int nkeys, ScanKey key) PS(node)->BytesRead = 0; PS(node)->BytesWritten = 0; - PS(node)->treeContext.tupDesc = - ExecGetTupType(outerPlan((Plan *) node)); + PS(node)->treeContext.tupDesc = ExecGetTupType(outerPlan((Plan *) node)); PS(node)->treeContext.nKeys = nkeys; PS(node)->treeContext.scanKeys = key; PS(node)->treeContext.sortMem = SortMem * 1024; @@ -336,8 +335,7 @@ initialrun(Sort *node) for (tp = PS(node)->Tape; tp - PS(node)->Tape < PS(node)->TapeRange; tp++) { - PS(node)->TotalDummy += - (tp->tp_dummy = baseruns + PS(node)->TotalDummy += (tp->tp_dummy = baseruns + (tp + 1)->tp_fib - tp->tp_fib); tp->tp_fib = baseruns @@ -945,10 +943,8 @@ psort_end(Sort *node) else if (PS(node)->memtuples) pfree(PS(node)->memtuples); - NDirectFileRead += - (int) ceil((double) PS(node)->BytesRead / BLCKSZ); - NDirectFileWrite += - (int) ceil((double) PS(node)->BytesWritten / BLCKSZ); + NDirectFileRead += (int) ceil((double) PS(node)->BytesRead / BLCKSZ); + NDirectFileWrite += (int) ceil((double) PS(node)->BytesWritten / BLCKSZ); pfree((void *) node->psortstate); node->psortstate = NULL; diff --git a/src/bin/psql/psql.c b/src/bin/psql/psql.c index cdd4c1d0d5..3b3ea179ec 100644 --- a/src/bin/psql/psql.c +++ b/src/bin/psql/psql.c @@ -7,7 +7,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.167 1999/01/27 01:18:21 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.168 1999/02/03 21:17:44 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -2422,8 +2422,7 @@ MainLoop(PsqlSettings *pset, char *query, FILE *source) { if (pset->prompt) free(pset->prompt); - pset->prompt = - malloc(strlen(PQdb(pset->db)) + strlen(PROMPT) + 1); + pset->prompt = malloc(strlen(PQdb(pset->db)) + strlen(PROMPT) + 1); if (pset->quiet) pset->prompt[0] = '\0'; else diff --git a/src/interfaces/ecpg/preproc/type.c b/src/interfaces/ecpg/preproc/type.c index cf68d8d60a..52cc8f8087 100644 --- a/src/interfaces/ecpg/preproc/type.c +++ b/src/interfaces/ecpg/preproc/type.c @@ -71,8 +71,7 @@ void ECPGmake_struct_member(char *name, struct ECPGtype * type, struct ECPGstruct_member ** start) { struct ECPGstruct_member *ptr, - *ne = - (struct ECPGstruct_member *) mm_alloc(sizeof(struct ECPGstruct_member)); + *ne = (struct ECPGstruct_member *) mm_alloc(sizeof(struct ECPGstruct_member)); ne->name = strdup(name); ne->typ = type; diff --git a/src/interfaces/libpq/fe-print.c b/src/interfaces/libpq/fe-print.c index a99fc27ba2..7bfd500c6a 100644 --- a/src/interfaces/libpq/fe-print.c +++ b/src/interfaces/libpq/fe-print.c @@ -9,7 +9,7 @@ * didn't really belong there. * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-print.c,v 1.16 1999/01/27 01:18:23 scrappy Exp $ + * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-print.c,v 1.17 1999/02/03 21:17:50 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -130,8 +130,7 @@ PQprint(FILE *fout, for (j = 0; j < nFields; j++) { int len; - char *s = - (j < numFieldName && po->fieldName[j][0]) ? + char *s = (j < numFieldName && po->fieldName[j][0]) ? po->fieldName[j] : PQfname(res, j); fieldNames[j] = s; @@ -175,8 +174,7 @@ PQprint(FILE *fout, nTups * (nFields + 1) >= screen_size.ws_row) || (!po->expanded && nTups * (total_line_length / screen_size.ws_col + 1) * - (1 + (po->standard != 0)) >= - screen_size.ws_row - + (1 + (po->standard != 0)) >= screen_size.ws_row - (po->header != 0) * (total_line_length / screen_size.ws_col + 1) * 2 - (po->header != 0) * 2 /* row count and newline */ diff --git a/src/interfaces/odbc/setup.c b/src/interfaces/odbc/setup.c index 42f538dc7d..dae789003d 100644 --- a/src/interfaces/odbc/setup.c +++ b/src/interfaces/odbc/setup.c @@ -113,8 +113,7 @@ LPSETUPDLG lpsetupdlg; lpsetupdlg->hwndParent = hwnd; lpsetupdlg->lpszDrvr = lpszDriver; lpsetupdlg->fNewDSN = (ODBC_ADD_DSN == fRequest); - lpsetupdlg->fDefault = - !lstrcmpi(lpsetupdlg->ci.dsn, INI_DSN); + lpsetupdlg->fDefault = !lstrcmpi(lpsetupdlg->ci.dsn, INI_DSN); // Display the appropriate dialog (if parent window handle supplied) if (hwnd) { diff --git a/src/pl/plpgsql/src/pl_exec.c b/src/pl/plpgsql/src/pl_exec.c index 30155f7b08..fa4935e965 100644 --- a/src/pl/plpgsql/src/pl_exec.c +++ b/src/pl/plpgsql/src/pl_exec.c @@ -3,7 +3,7 @@ * procedural language * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.6 1999/01/27 16:15:22 wieck Exp $ + * $Header: /cvsroot/pgsql/src/pl/plpgsql/src/pl_exec.c,v 1.7 1999/02/03 21:17:58 momjian Exp $ * * This software is copyrighted by Jan Wieck - Hamburg. * @@ -2540,8 +2540,7 @@ exec_simple_check_plan(PLpgSQL_expr * expr) ((Param *)(tle->expr))->paramtype; break; - case T_Const: expr->plan_simple_type = - ((Const *)(tle->expr))->consttype; + case T_Const: expr->plan_simple_type = ((Const *)(tle->expr))->consttype; break; default: expr->plan_simple_type = InvalidOid; diff --git a/src/test/regress/regress.c b/src/test/regress/regress.c index ac3d4304e1..02bfa10839 100644 --- a/src/test/regress/regress.c +++ b/src/test/regress/regress.c @@ -1,5 +1,5 @@ /* - * $Header: /cvsroot/pgsql/src/test/regress/regress.c,v 1.28 1998/09/01 03:29:11 momjian Exp $ + * $Header: /cvsroot/pgsql/src/test/regress/regress.c,v 1.29 1999/02/03 21:18:02 momjian Exp $ */ #include /* faked on sunos */ @@ -389,8 +389,7 @@ funny_dup17() if (SPI_processed > 0) { - selected = - int4in( + selected = int4in( SPI_getvalue( SPI_tuptable->vals[0], SPI_tuptable->tupdesc, -- 2.40.0