*
*
* 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
if (repl[attoff] == ' ')
{
- value[attoff] =
- heap_getattr(tuple,
+ value[attoff] = heap_getattr(tuple,
AttrOffsetGetAttrNumber(attoff),
RelationGetDescr(relation),
&isNull);
*
*
* 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
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);
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);
*
*
* 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.
/* 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);
*
*
* 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.
{
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);
{
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);
* 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;
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
Assert(StrategyEvaluationIsValid(evaluation));
Assert(RegProcedureIsValid(procedure));
- strategyMap =
- IndexStrategyGetStrategyMap(RelationGetIndexStrategy(relation),
+ strategyMap = IndexStrategyGetStrategyMap(RelationGetIndexStrategy(relation),
evaluation->maxStrategy,
attributeNumber);
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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));
}
*
*
* 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
*
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);
*/
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]));
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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))
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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
*
*
* 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
if (AMI_OVERRIDE)
return true;
- return
- TransactionLogTest(transactionId, XID_COMMIT);
+ return TransactionLogTest(transactionId, XID_COMMIT);
}
/*
if (AMI_OVERRIDE)
return false;
- return
- TransactionLogTest(transactionId, XID_ABORT);
+ return TransactionLogTest(transactionId, XID_ABORT);
}
/*
if (AMI_OVERRIDE)
return false;
- return
- TransactionLogTest(transactionId, XID_INPROGRESS);
+ return TransactionLogTest(transactionId, XID_INPROGRESS);
}
*/
*
*
* 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
LockBuffer(buffer, BUFFER_LOCK_UNLOCK);
ReleaseBuffer(buffer);
- return
- xstatus;
+ return xstatus;
}
/* --------------------------------
*
*
* 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:
TBLOCK_DEFAULT /* transaction block state */
};
-TransactionState CurrentTransactionState =
-&CurrentTransactionStateData;
+TransactionState CurrentTransactionState = &CurrentTransactionStateData;
int DefaultXactIsoLevel = XACT_READ_COMMITTED;
int XactIsoLevel;
if (AMI_OVERRIDE)
return false;
- return
- (cid == s->commandId) ? true : false;
+ return (cid == s->commandId) ? true : false;
}
bool
if (AMI_OVERRIDE)
return false;
- return
- (cid >= s->scanCommandId) ? true : false;
+ return (cid >= s->scanCommandId) ? true : false;
}
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();
* 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 $
*
*-------------------------------------------------------------------------
*/
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");
*
*
* 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
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
*
*
* 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
oldcxt = MemoryContextSwitchTo((MemoryContext) CacheCxt);
- indexRelation->rd_am =
- AccessMethodObjectIdGetForm(amoid);
+ indexRelation->rd_am = AccessMethodObjectIdGetForm(amoid);
MemoryContextSwitchTo(oldcxt);
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);
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
}
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)
*
*
* 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.
*/
heap_close(pg_operator_desc);
- return
- operatorObjectId;
+ return operatorObjectId;
}
/* ----------------------------------------------------------------
*/
pfree(tup);
- return
- operatorObjectId;
+ return operatorObjectId;
}
/* ----------------------------------------------------------------
* and recover the shell tuple's oid.
* ----------------
*/
- operatorObjectId =
- OperatorShellMakeWithOpenRelation(pg_operator_desc,
+ operatorObjectId = OperatorShellMakeWithOpenRelation(pg_operator_desc,
operatorName,
leftObjectId,
rightObjectId);
*/
heap_close(pg_operator_desc);
- return
- operatorObjectId;
+ return operatorObjectId;
}
/* --------------------------------
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);
/* ----------------
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';
}
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
/*
* ... 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
*/
pfree(tup);
- return
- typoid;
+ return typoid;
}
/* ----------------------------------------------------------------
*/
heap_close(pg_type_desc);
- return
- typoid;
+ return typoid;
}
/* ----------------------------------------------------------------
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
* 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 */
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);
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);
}
*
*
* 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
*/
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
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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 *));
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);
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]);
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)++;
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
* 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
if (!HeapTupleIsValid(tuple))
break;
- lnext(current) =
- lconsi(((Form_pg_inherits)
+ lnext(current) = lconsi(((Form_pg_inherits)
GETSTRUCT(tuple))->inhparent,
NIL);
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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]);
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);
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++)
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++)
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++)
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++)
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++)
{
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++)
{
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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++)
{
*
* 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 $
*
*-------------------------------------------------------------------------
*/
#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
* 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);
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
*/
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';
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
* 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);
}
/* ----------------------------------------------------------------
fcache = func->func_fcache;
}
- return
- ExecMakeFunctionResult((Node *) func, argList, econtext, isNull, isDone);
+ return ExecMakeFunctionResult((Node *) func, argList, econtext, isNull, isDone);
}
/* ----------------------------------------------------------------
if (nodomains > 64)
pfree(null_head);
- return
- newTuple;
+ return newTuple;
}
/* ----------------------------------------------------------------
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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++;
}
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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;
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
int i;
ParamListInfo paramLI;
- paramLI =
- (ParamListInfo) palloc((nargs + 1) * sizeof(ParamListInfoData));
+ paramLI = (ParamListInfo) palloc((nargs + 1) * sizeof(ParamListInfoData));
MemSet(paramLI, 0, nargs * sizeof(ParamListInfoData));
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);
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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;
* 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 $
*
*-------------------------------------------------------------------------
*/
* ------------------
*/
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);
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
* hash node
* ------------------
*/
- hjstate->hj_InnerBatches =
- hashNode->hashstate->hashBatches;
+ hjstate->hj_InnerBatches = hashNode->hashstate->hashBatches;
}
outerbatchPos = (RelativeAddr *) ABSADDR(hashtable->outerbatchPos);
curbatch = hashtable->curbatch;
*/
{
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);
*/
/* ----------------
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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);
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
econtext->ecxt_outertuple = outerTupleSlot;
mergestate->mj_MarkedTupleSlot->ttc_tupleDescriptor =
- innerTupleSlot->ttc_tupleDescriptor;
+ innerTupleSlot->ttc_tupleDescriptor;
/* ----------------
* initialize merge join state to skip inner tuples.
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
char *
pbuf_addValues(int n)
{
- return
- pbuf_alloc(n);
+ return pbuf_alloc(n);
}
/* --------------------------------
int field_number)
{
pbuf_checkFnumber(group, field_number);
- return
- (group->types[field_number]).name;
+ return (group->types[field_number]).name;
}
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
{
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;
*
*
* 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
_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 */
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 */
#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 */
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 */
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;
}
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 */
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 */
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 */
*
* 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 $
*
*-------------------------------------------------------------------------
*/
* 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);
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);
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)
{
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)
new_joininfo->mergejoinable = mergejoinable;
new_joininfo->hashjoinable = hashjoinable;
new_joininfo->inactive = false;
- joinrel->joininfo =
- lappend(joinrel->joininfo,
+ joinrel->joininfo = lappend(joinrel->joininfo,
new_joininfo);
}
}
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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)
{
*
* 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 $
*
*-------------------------------------------------------------------------
*/
/* 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);
*
* 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 $
*
*-------------------------------------------------------------------------
*/
* "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" */
}
}
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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;
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
*/
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));
}
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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)
{
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;
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
* 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);
{
restrict_op = oprid(newop);
- isIndexable =
- (op_class(restrict_op, xclass, index->relam) &&
+ isIndexable = (op_class(restrict_op, xclass, index->relam) &&
IndexScanableOperand(leftop,
indexkey,
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) &&
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) &&
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,
{
List *clauses = lfirst(clausegroups);
- ((RestrictInfo *) lfirst(clauses))->cinfojoinid =
- joininfo->otherrels;
+ ((RestrictInfo *) lfirst(clauses))->cinfojoinid = joininfo->otherrels;
}
cg_list = nconc(cg_list, clausegroups);
}
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,
* 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);
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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));
}
* 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,
* 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,
* hashed before being joined.
*/
- pathlist =
- add_pathlist(joinrel, pathlist,
+ pathlist = add_pathlist(joinrel, pathlist,
hash_inner_and_outer(joinrel, outerrel,
innerrel, hashinfo_list));
{
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,
if (outerpath_ordering)
{
- xmergeinfo =
- match_order_mergeinfo(outerpath_ordering,
+ xmergeinfo = match_order_mergeinfo(outerpath_ordering,
mergeinfo_list);
}
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
{
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,
false))));
if (!path_is_cheaper_than_sort)
{
- varkeys =
- extract_path_keys(matchedJoinKeys,
+ varkeys = extract_path_keys(matchedJoinKeys,
innerrel->targetlist,
INNER);
}
else
mergeinnerpath = cheapest_inner;
- temp_node =
- lcons(create_mergejoin_path(joinrel,
+ temp_node = lcons(create_mergejoin_path(joinrel,
outerrel->size,
innerrel->size,
outerrel->width,
if (innerpath_ordering)
{
- xmergeinfo =
- match_order_mergeinfo(innerpath_ordering,
+ xmergeinfo = match_order_mergeinfo(innerpath_ordering,
mergeinfo_list);
}
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,
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,
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);
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
* 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);
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;
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);
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
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)
{
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
new_joininfo->mergejoinable = mergejoinable;
new_joininfo->hashjoinable = hashjoinable;
new_joininfo->inactive = false;
- joinrel->joininfo =
- lappend(joinrel->joininfo,
+ joinrel->joininfo = lappend(joinrel->joininfo,
new_joininfo);
}
}
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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)
{
if (p != NIL)
continue; /* key already in pathkeys */
- pathkeys =
- lappend(pathkeys, lcons(key, NIL));
+ pathkeys = lappend(pathkeys, lcons(key, NIL));
}
return pathkeys;
}
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;
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);
}
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 &&
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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);
}
}
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
* 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);
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
* 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 */
/* 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);
}
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);
}
}
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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))
{
{
/* 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))
{
{
/* 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
* 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;
}
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);
}
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);
}
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
(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,
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))
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;
/*
* 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);
* 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));
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,
(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)));
{
subclause = lfirst(i);
if (subclause)
- new_subclauses =
- lappend(new_subclauses,
+ new_subclauses = lappend(new_subclauses,
fix_indxqual_references(subclause,
index_path));
{
subclause = lfirst(i);
if (subclause)
- new_subclauses =
- lappend(new_subclauses,
+ new_subclauses = lappend(new_subclauses,
fix_indxqual_references(subclause,
index_path));
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
}
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);
}
}
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 */
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);
}
}
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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");
* 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)
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
{
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);
}
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
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);
}
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);
}
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);
}
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);
}
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);
}
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 =
}
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))
}
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;
((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;
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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);
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))));
}
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
* 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 */
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
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);
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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);
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));
}
}
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
foreach(i, restrictinfo_list)
{
temp = (RestrictInfo *) lfirst(i);
- result =
- lappendi(result,
+ result = lappendi(result,
(((Oper *) temp->clause->oper)->opno));
}
return result;
*
*
* 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
bool
is_opclause(Node *clause)
{
- return
- (clause != NULL &&
+ return (clause != NULL &&
nodeTag(clause) == T_Expr && ((Expr *) clause)->opType == OP_EXPR);
}
static bool
agg_clause(Node *clause)
{
- return
- (clause != NULL && nodeTag(clause) == T_Aggref);
+ return (clause != NULL && nodeTag(clause) == T_Aggref);
}
/*****************************************************************************
bool
is_funcclause(Node *clause)
{
- return
- (clause != NULL &&
+ return (clause != NULL &&
nodeTag(clause) == T_Expr && ((Expr *) clause)->opType == FUNC_EXPR);
}
bool
not_clause(Node *clause)
{
- return
- (clause != NULL &&
+ return (clause != NULL &&
nodeTag(clause) == T_Expr && ((Expr *) clause)->opType == NOT_EXPR);
}
bool
and_clause(Node *clause)
{
- return
- (clause != NULL &&
+ return (clause != NULL &&
nodeTag(clause) == T_Expr && ((Expr *) clause)->opType == AND_EXPR);
}
bool
case_clause(Node *clause)
{
- return
- (clause != NULL &&
+ return (clause != NULL &&
nodeTag(clause) == T_CaseExpr);
}
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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));
}
}
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
* 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);
#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;
* 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);
/*
*/
/* 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,
#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
/* 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
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
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,
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,
#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;
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,
#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;
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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;
}
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
var->varno,
var->varoattno);
- rel->targetlist =
- lappend(tlist,
+ rel->targetlist = lappend(tlist,
create_tl_element(newvar,
length(tlist) + 1));
}
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;
}
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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 &&
/* 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);
}
break;
case FLOAT4OID: /* float4 */
{
- float32 floatVal =
- DatumGetFloat32(((Const *) expr)->constvalue);
+ float32 floatVal = DatumGetFloat32(((Const *) expr)->constvalue);
const_string = (char *) palloc(256);
string_palloced = true;
}
case FLOAT8OID: /* float8 */
{
- float64 floatVal =
- DatumGetFloat64(((Const *) expr)->constvalue);
+ float64 floatVal = DatumGetFloat64(((Const *) expr)->constvalue);
const_string = (char *) palloc(256);
string_palloced = true;
(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:
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
*/
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 */
{
if (!strcmp(funcname, "*"))
{
- funcnode->func_tlist =
- expandAll(pstate, relname, refname, curr_resno);
+ funcnode->func_tlist = expandAll(pstate, relname, refname, curr_resno);
}
else
{
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;
}
current_input_typeids = *input_typeid_vector++;
}
- while (current_input_typeids !=
- InvalidOid && ncandidates == 0);
+ while (current_input_typeids != InvalidOid && ncandidates == 0);
}
}
*/
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);
}
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;
}
{
Expr *newexpr;
- funcnode->func_tlist =
- setup_tlist(funcname, argrelid);
+ funcnode->func_tlist = setup_tlist(funcname, argrelid);
funcnode->functype = attnumTypeId(rd, attnum);
newexpr = makeNode(Expr);
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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;
}
* 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;
}
do
{
- convert[place++] =
- (caps ? "0123456789ABCDEF" : "0123456789abcdef")
+ convert[place++] = (caps ? "0123456789ABCDEF" : "0123456789abcdef")
[uvalue % (unsigned) base];
uvalue = (uvalue / (unsigned) base);
} while (uvalue);
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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,
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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
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
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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;
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
BlockNumber
RelationGetNumberOfBlocks(Relation relation)
{
- return
- ((relation->rd_myxactonly) ? relation->rd_nblocks :
+ return ((relation->rd_myxactonly) ? relation->rd_nblocks :
smgrnblocks(DEFAULT_SMGR, relation));
}
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
buf->buf_id = -i - 2;
}
- LocalRefCount =
- (long *) malloc(sizeof(long) * NLocBuffer);
+ LocalRefCount = (long *) malloc(sizeof(long) * NLocBuffer);
MemSet(LocalRefCount, 0, sizeof(long) * NLocBuffer);
}
* 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:
*
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());
}
/* 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);
}
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);
}
else
{
- returnCode = VfdCache[file].seekPos =
- lseek(VfdCache[file].fd, offset, whence);
+ returnCode = VfdCache[file].seekPos = lseek(VfdCache[file].fd, offset, whence);
return returnCode;
}
/* NOTREACHED */
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
/* next is ShmemVariableCache */
ShmemVariableCache = (VariableCache) (ShmemIndexOffset + 1);
- currFreeSpace +=
- sizeof(ShmemFreeStart) + sizeof(ShmemIndexOffset) +
+ currFreeSpace += sizeof(ShmemFreeStart) + sizeof(ShmemIndexOffset) +
LONGALIGN(sizeof(VariableCacheData));
/*
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
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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)
*/
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);
}
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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;
}
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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);
*/
#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
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))
*
*
* 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
{
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;
}
*
*
* 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
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);
break;
}
- return
- CatalogCacheComputeHashIndex(cacheInOutP);
+ return CatalogCacheComputeHashIndex(cacheInOutP);
}
/* --------------------------------
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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,
*
*
* 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...
*
Assert(PointerIsValid(entry));
((InvalidationUserData *) entry)->dataP[-1] =
- (InvalidationUserData *) invalid;
+ (InvalidationUserData *) invalid;
return entry;
}
*
*
* 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.
struct varlena *
get_typdefault(Oid typid)
{
- struct varlena *typdefault =
- (struct varlena *) TypeDefaultRetrieve(typid);
+ struct varlena *typdefault = (struct varlena *) TypeDefaultRetrieve(typid);
return typdefault;
}
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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);
if (numlocks == maxlocks)
{
maxlocks *= 2;
- rules =
- (RewriteRule **) repalloc(rules, sizeof(RewriteRule *) * maxlocks);
+ rules = (RewriteRule **) repalloc(rules, sizeof(RewriteRule *) * maxlocks);
}
}
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
{
*/
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);
*
*
* 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
Assert(!PointerIsValid((Pointer) SysCache[cacheId]));
- SysCache[cacheId] =
- InitSysCache(cacheinfo[cacheId].name,
+ SysCache[cacheId] = InitSysCache(cacheinfo[cacheId].name,
cacheinfo[cacheId].indname,
cacheId,
cacheinfo[cacheId].nkeys,
if (!PointerIsValid(SysCache[cacheId]))
{
- SysCache[cacheId] =
- InitSysCache(cacheinfo[cacheId].name,
+ SysCache[cacheId] = InitSysCache(cacheinfo[cacheId].name,
cacheinfo[cacheId].indname,
cacheId,
cacheinfo[cacheId].nkeys,
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
{
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
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);
finfo.fn_nargs = nargs;
/* XXX see WAY_COOL_ORTHOGONAL_FUNCTIONS */
- return
- (fmgr_c(&finfo,
+ return (fmgr_c(&finfo,
(FmgrValues *) args,
isNull));
}
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
/* 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;
}
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 *));
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
FixedStackPush(&context->stackData, context->block);
/* allocate and initialize new block */
- context->block =
- MemoryContextAlloc(
+ context->block = MemoryContextAlloc(
(MemoryContext) PortalHeapMemoryGetVariableMemory(context),
sizeof(HeapMemoryBlockData));
*
* 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.
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;
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
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;
*
*
* 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 $
*
*-------------------------------------------------------------------------
*/
{
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
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;
* 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 $
*
*-------------------------------------------------------------------------
*/
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;
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 */
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) {
* 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.
*
((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;
/*
- * $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 <float.h> /* faked on sunos */
if (SPI_processed > 0)
{
- selected =
- int4in(
+ selected = int4in(
SPI_getvalue(
SPI_tuptable->vals[0],
SPI_tuptable->tupdesc,