diff --git a/src/backend/access/gist/gist.c b/src/backend/access/gist/gist.c index 89f59ebc279853a7d3e13172181de85a12fc9bd7..00b1620ab00f6d3847c4681650c62f9270c1dbbc 100644 --- a/src/backend/access/gist/gist.c +++ b/src/backend/access/gist/gist.c @@ -8,7 +8,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/access/gist/gist.c,v 1.126 2005/09/22 20:44:36 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/access/gist/gist.c,v 1.127 2005/10/18 01:06:22 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -321,14 +321,12 @@ gistplacetopage(GISTInsertState *state, GISTSTATE *giststate) /* no space for insertion */ IndexTuple *itvec, *newitup; - int tlen, - olen; + int tlen; SplitedPageLayout *dist = NULL, *ptr; is_splitted = true; itvec = gistextractbuffer(state->stack->buffer, &tlen); - olen = tlen; itvec = gistjoinvector(itvec, &tlen, state->itup, state->ituplen); newitup = gistSplit(state->r, state->stack->buffer, itvec, &tlen, &dist, giststate); diff --git a/src/backend/access/hash/hashinsert.c b/src/backend/access/hash/hashinsert.c index 7637c3566cb3f2a0a3c062015bd02c7157f95454..9976489ae9dc530b3699e5f93269dd1bac99700a 100644 --- a/src/backend/access/hash/hashinsert.c +++ b/src/backend/access/hash/hashinsert.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/access/hash/hashinsert.c,v 1.38 2005/10/15 02:49:08 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/access/hash/hashinsert.c,v 1.39 2005/10/18 01:06:23 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -37,8 +37,6 @@ _hash_doinsert(Relation rel, HashItem hitem) Buffer metabuf; HashMetaPage metap; IndexTuple itup; - BlockNumber itup_blkno; - OffsetNumber itup_off; BlockNumber blkno; Page page; HashPageOpaque pageopaque; @@ -159,8 +157,7 @@ _hash_doinsert(Relation rel, HashItem hitem) } /* found page with enough space, so add the item here */ - itup_off = _hash_pgaddtup(rel, buf, itemsz, hitem); - itup_blkno = BufferGetBlockNumber(buf); + (void) _hash_pgaddtup(rel, buf, itemsz, hitem); /* write and release the modified page */ _hash_wrtbuf(rel, buf); diff --git a/src/backend/access/hash/hashsearch.c b/src/backend/access/hash/hashsearch.c index fac46d7902250b52cc5850b46c3a18a2170e5cae..a0d9f4afb94794073bfbf631c8251822870aba46 100644 --- a/src/backend/access/hash/hashsearch.c +++ b/src/backend/access/hash/hashsearch.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/access/hash/hashsearch.c,v 1.40 2005/10/15 02:49:08 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/access/hash/hashsearch.c,v 1.41 2005/10/18 01:06:23 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -247,7 +247,6 @@ _hash_step(IndexScanDesc scan, Buffer *bufP, ScanDirection dir) HashPageOpaque opaque; OffsetNumber maxoff; OffsetNumber offnum; - Bucket bucket; BlockNumber blkno; HashItem hitem; IndexTuple itup; @@ -258,7 +257,6 @@ _hash_step(IndexScanDesc scan, Buffer *bufP, ScanDirection dir) page = BufferGetPage(buf); _hash_checkpage(rel, page, LH_BUCKET_PAGE | LH_OVERFLOW_PAGE); opaque = (HashPageOpaque) PageGetSpecialPointer(page); - bucket = opaque->hasho_bucket; /* * If _hash_step is called from _hash_first, current will not be valid, so @@ -274,8 +272,8 @@ _hash_step(IndexScanDesc scan, Buffer *bufP, ScanDirection dir) /* * 'offnum' now points to the last tuple we have seen (if any). * - * continue to step through tuples until: 1) we get to the end of the bucket - * chain or 2) we find a valid tuple. + * continue to step through tuples until: 1) we get to the end of the + * bucket chain or 2) we find a valid tuple. */ do { diff --git a/src/backend/access/nbtree/nbtsearch.c b/src/backend/access/nbtree/nbtsearch.c index 06075dd3ddabe25b509d2ff30d0e1ca8ca9b1e7d..e487b49882053db304a5e380e59caca6100c64b4 100644 --- a/src/backend/access/nbtree/nbtsearch.c +++ b/src/backend/access/nbtree/nbtsearch.c @@ -8,7 +8,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/access/nbtree/nbtsearch.c,v 1.95 2005/10/15 02:49:09 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/access/nbtree/nbtsearch.c,v 1.96 2005/10/18 01:06:23 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -225,7 +225,6 @@ _bt_binsrch(Relation rel, ScanKey scankey, bool nextkey) { - TupleDesc itupdesc; Page page; BTPageOpaque opaque; OffsetNumber low, @@ -233,7 +232,6 @@ _bt_binsrch(Relation rel, int32 result, cmpval; - itupdesc = RelationGetDescr(rel); page = BufferGetPage(buf); opaque = (BTPageOpaque) PageGetSpecialPointer(page); diff --git a/src/backend/access/nbtree/nbtutils.c b/src/backend/access/nbtree/nbtutils.c index 269213d21f7d373b768f8d46b4f909238510ff72..7d60c98f38df4da3466f8849d2142106faccf3ef 100644 --- a/src/backend/access/nbtree/nbtutils.c +++ b/src/backend/access/nbtree/nbtutils.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/access/nbtree/nbtutils.c,v 1.64 2005/10/15 02:49:09 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/access/nbtree/nbtutils.c,v 1.65 2005/10/18 01:06:23 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -79,11 +79,9 @@ ScanKey _bt_mkscankey_nodata(Relation rel) { ScanKey skey; - TupleDesc itupdesc; int natts; int i; - itupdesc = RelationGetDescr(rel); natts = RelationGetNumberOfAttributes(rel); skey = (ScanKey) palloc(natts * sizeof(ScanKeyData)); diff --git a/src/backend/access/nbtree/nbtxlog.c b/src/backend/access/nbtree/nbtxlog.c index 61bf93a904b97d3c7a8b33e568b2de09b0a62f41..ab2e9e92e766117cc2d2f9c6c24d4f87105d792c 100644 --- a/src/backend/access/nbtree/nbtxlog.c +++ b/src/backend/access/nbtree/nbtxlog.c @@ -8,7 +8,7 @@ * Portions Copyright (c) 1994, Regents of the University of California * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/access/nbtree/nbtxlog.c,v 1.23 2005/10/15 02:49:09 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/access/nbtree/nbtxlog.c,v 1.24 2005/10/18 01:06:23 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -156,7 +156,6 @@ btree_xlog_insert(bool isleaf, bool ismeta, Relation reln; Buffer buffer; Page page; - BTPageOpaque pageop; char *datapos; int datalen; xl_btree_metadata md; @@ -187,7 +186,6 @@ btree_xlog_insert(bool isleaf, bool ismeta, page = (Page) BufferGetPage(buffer); if (PageIsNew((PageHeader) page)) elog(PANIC, "btree_insert_redo: uninitialized page"); - pageop = (BTPageOpaque) PageGetSpecialPointer(page); if (XLByteLE(lsn, PageGetLSN(page))) { diff --git a/src/backend/catalog/heap.c b/src/backend/catalog/heap.c index 15c0129c61364260183e9fa1746258c4aeac8831..f8a4ff769af5659cab04078e111b3df3a4f7e28e 100644 --- a/src/backend/catalog/heap.c +++ b/src/backend/catalog/heap.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/catalog/heap.c,v 1.291 2005/10/15 02:49:12 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/catalog/heap.c,v 1.292 2005/10/18 01:06:23 tgl Exp $ * * * INTERFACE ROUTINES @@ -1452,7 +1452,6 @@ AddRelationRawConstraints(Relation rel, TupleDesc tupleDesc; TupleConstr *oldconstr; int numoldchecks; - ConstrCheck *oldchecks; ParseState *pstate; RangeTblEntry *rte; int numchecks; @@ -1467,15 +1466,9 @@ AddRelationRawConstraints(Relation rel, tupleDesc = RelationGetDescr(rel); oldconstr = tupleDesc->constr; if (oldconstr) - { numoldchecks = oldconstr->num_check; - oldchecks = oldconstr->check; - } else - { numoldchecks = 0; - oldchecks = NULL; - } /* * Create a dummy ParseState and insert the target relation as its sole diff --git a/src/backend/catalog/pg_conversion.c b/src/backend/catalog/pg_conversion.c index 21adfbcf94ae0110a3339568a3ffaade3e5d345a..d0ec8c699f4bb22b67817e449f05f37387b29404 100644 --- a/src/backend/catalog/pg_conversion.c +++ b/src/backend/catalog/pg_conversion.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/catalog/pg_conversion.c,v 1.27 2005/10/15 02:49:14 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/catalog/pg_conversion.c,v 1.28 2005/10/18 01:06:23 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -174,7 +174,6 @@ void RemoveConversionById(Oid conversionOid) { Relation rel; - TupleDesc tupDesc; HeapTuple tuple; HeapScanDesc scan; ScanKeyData scanKeyData; @@ -186,7 +185,6 @@ RemoveConversionById(Oid conversionOid) /* open pg_conversion */ rel = heap_open(ConversionRelationId, RowExclusiveLock); - tupDesc = rel->rd_att; scan = heap_beginscan(rel, SnapshotNow, 1, &scanKeyData); diff --git a/src/backend/commands/typecmds.c b/src/backend/commands/typecmds.c index 7caacdacd2fcc798132bc591ad70ebe3b3640463..5cf51658eeb039231c85a4c67d6577af42a27046 100644 --- a/src/backend/commands/typecmds.c +++ b/src/backend/commands/typecmds.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/commands/typecmds.c,v 1.81 2005/10/15 02:49:16 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/commands/typecmds.c,v 1.82 2005/10/18 01:06:24 tgl Exp $ * * DESCRIPTION * The "DefineFoo" routines take the parse tree and pick out the @@ -1335,7 +1335,6 @@ AlterDomainDropConstraint(List *names, const char *constrName, DropBehavior beha Oid domainoid; HeapTuple tup; Relation rel; - Form_pg_type typTup; Relation conrel; SysScanDesc conscan; ScanKeyData key[1]; @@ -1379,8 +1378,6 @@ AlterDomainDropConstraint(List *names, const char *constrName, DropBehavior beha conscan = systable_beginscan(conrel, ConstraintTypidIndexId, true, SnapshotNow, 1, key); - typTup = (Form_pg_type) GETSTRUCT(tup); - /* * Scan over the result set, removing any matching entries. */ diff --git a/src/backend/executor/nodeHashjoin.c b/src/backend/executor/nodeHashjoin.c index 9f002dde9cfc39b75efb24051b37ae7076d1df88..817f3822ef6dfa74a7aac1c86a13fd0635ad38ac 100644 --- a/src/backend/executor/nodeHashjoin.c +++ b/src/backend/executor/nodeHashjoin.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/executor/nodeHashjoin.c,v 1.74 2005/10/15 02:49:17 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/executor/nodeHashjoin.c,v 1.75 2005/10/18 01:06:24 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -50,7 +50,6 @@ ExecHashJoin(HashJoinState *node) HashState *hashNode; List *joinqual; List *otherqual; - ScanDirection dir; TupleTableSlot *inntuple; ExprContext *econtext; ExprDoneCond isDone; @@ -68,7 +67,6 @@ ExecHashJoin(HashJoinState *node) otherqual = node->js.ps.qual; hashNode = (HashState *) innerPlanState(node); outerNode = outerPlanState(node); - dir = estate->es_direction; /* * get information from HashJoin state diff --git a/src/backend/rewrite/rewriteDefine.c b/src/backend/rewrite/rewriteDefine.c index 76b2576646571e29b51f1ab00b0a63930ee98850..483afd395f140e31c9ffa5ed45e99aa05bc40fa0 100644 --- a/src/backend/rewrite/rewriteDefine.c +++ b/src/backend/rewrite/rewriteDefine.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $PostgreSQL: pgsql/src/backend/rewrite/rewriteDefine.c,v 1.106 2005/10/15 02:49:24 momjian Exp $ + * $PostgreSQL: pgsql/src/backend/rewrite/rewriteDefine.c,v 1.107 2005/10/18 01:06:24 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -191,7 +191,6 @@ DefineQueryRewrite(RuleStmt *stmt) Oid ev_relid; Oid ruleId; int event_attno; - Oid event_attype; ListCell *l; Query *query; AclResult aclresult; @@ -432,7 +431,6 @@ DefineQueryRewrite(RuleStmt *stmt) * This rule is allowed - prepare to install it. */ event_attno = -1; - event_attype = InvalidOid; /* * We want the rule's table references to be checked as though by the rule