]> granicus.if.org Git - postgresql/commitdiff
Remove un-needed braces around single statements.
authorBruce Momjian <bruce@momjian.us>
Mon, 15 Jun 1998 19:30:31 +0000 (19:30 +0000)
committerBruce Momjian <bruce@momjian.us>
Mon, 15 Jun 1998 19:30:31 +0000 (19:30 +0000)
224 files changed:
contrib/array/array_iterator.c
contrib/datetime/datetime_functions.c
contrib/string/string_io.c
src/backend/access/common/heaptuple.c
src/backend/access/common/indextuple.c
src/backend/access/common/indexvalid.c
src/backend/access/common/tupdesc.c
src/backend/access/gist/gist.c
src/backend/access/gist/gistget.c
src/backend/access/gist/gistscan.c
src/backend/access/hash/hashinsert.c
src/backend/access/hash/hashovfl.c
src/backend/access/hash/hashpage.c
src/backend/access/hash/hashscan.c
src/backend/access/hash/hashsearch.c
src/backend/access/heap/heapam.c
src/backend/access/index/genam.c
src/backend/access/index/istrat.c
src/backend/access/nbtree/nbtinsert.c
src/backend/access/nbtree/nbtree.c
src/backend/access/nbtree/nbtscan.c
src/backend/access/nbtree/nbtsearch.c
src/backend/access/nbtree/nbtsort.c
src/backend/access/nbtree/nbtutils.c
src/backend/access/rtree/rtget.c
src/backend/access/rtree/rtree.c
src/backend/access/rtree/rtscan.c
src/backend/access/transam/xact.c
src/backend/bootstrap/bootstrap.c
src/backend/catalog/aclchk.c
src/backend/catalog/heap.c
src/backend/catalog/index.c
src/backend/catalog/indexing.c
src/backend/catalog/pg_proc.c
src/backend/catalog/pg_type.c
src/backend/commands/_deadcode/version.c
src/backend/commands/async.c
src/backend/commands/command.c
src/backend/commands/copy.c
src/backend/commands/creatinh.c
src/backend/commands/dbcommands.c
src/backend/commands/defind.c
src/backend/commands/define.c
src/backend/commands/proclang.c
src/backend/commands/recipe.c
src/backend/commands/remove.c
src/backend/commands/sequence.c
src/backend/commands/trigger.c
src/backend/commands/vacuum.c
src/backend/commands/variable.c
src/backend/commands/view.c
src/backend/executor/execAmi.c
src/backend/executor/execJunk.c
src/backend/executor/execMain.c
src/backend/executor/execProcnode.c
src/backend/executor/execQual.c
src/backend/executor/execUtils.c
src/backend/executor/functions.c
src/backend/executor/nodeAgg.c
src/backend/executor/nodeAppend.c
src/backend/executor/nodeGroup.c
src/backend/executor/nodeHash.c
src/backend/executor/nodeIndexscan.c
src/backend/executor/nodeMergejoin.c
src/backend/executor/nodeNestloop.c
src/backend/executor/nodeSeqscan.c
src/backend/executor/nodeSort.c
src/backend/executor/nodeTee.c
src/backend/lib/dllist.c
src/backend/lib/fstack.c
src/backend/lib/stringinfo.c
src/backend/libpq/be-fsstubs.c
src/backend/libpq/be-pqexec.c
src/backend/libpq/crypt.c
src/backend/libpq/hba.c
src/backend/libpq/password.c
src/backend/libpq/portal.c
src/backend/libpq/pqcomm.c
src/backend/libpq/pqsignal.c
src/backend/main/main.c
src/backend/nodes/copyfuncs.c
src/backend/nodes/list.c
src/backend/nodes/outfuncs.c
src/backend/nodes/print.c
src/backend/nodes/read.c
src/backend/nodes/readfuncs.c
src/backend/optimizer/geqo/geqo_erx.c
src/backend/optimizer/geqo/geqo_eval.c
src/backend/optimizer/geqo/geqo_misc.c
src/backend/optimizer/geqo/geqo_params.c
src/backend/optimizer/geqo/geqo_paths.c
src/backend/optimizer/geqo/geqo_pool.c
src/backend/optimizer/geqo/geqo_px.c
src/backend/optimizer/geqo/minspantree.c
src/backend/optimizer/path/allpaths.c
src/backend/optimizer/path/clausesel.c
src/backend/optimizer/path/costsize.c
src/backend/optimizer/path/indxpath.c
src/backend/optimizer/path/joinpath.c
src/backend/optimizer/path/joinrels.c
src/backend/optimizer/path/joinutils.c
src/backend/optimizer/path/orindxpath.c
src/backend/optimizer/path/predmig.c
src/backend/optimizer/path/prune.c
src/backend/optimizer/path/xfunc.c
src/backend/optimizer/plan/createplan.c
src/backend/optimizer/plan/initsplan.c
src/backend/optimizer/plan/planmain.c
src/backend/optimizer/plan/setrefs.c
src/backend/optimizer/plan/subselect.c
src/backend/optimizer/prep/prepqual.c
src/backend/optimizer/prep/preptlist.c
src/backend/optimizer/prep/prepunion.c
src/backend/optimizer/util/clauses.c
src/backend/optimizer/util/indexnode.c
src/backend/optimizer/util/joininfo.c
src/backend/optimizer/util/pathnode.c
src/backend/optimizer/util/plancat.c
src/backend/optimizer/util/tlist.c
src/backend/optimizer/util/var.c
src/backend/parser/gram.c
src/backend/parser/parse_agg.c
src/backend/parser/parse_expr.c
src/backend/parser/parse_func.c
src/backend/parser/parse_oper.c
src/backend/parser/parse_target.c
src/backend/parser/parse_type.c
src/backend/parser/parser.c
src/backend/parser/scan.c
src/backend/port/dynloader/bsd.c
src/backend/port/dynloader/bsdi.c
src/backend/port/dynloader/hpux.c
src/backend/port/dynloader/linux.c
src/backend/port/dynloader/ultrix4.c
src/backend/port/strcasecmp.c
src/backend/postmaster/postmaster.c
src/backend/regex/engine.c
src/backend/regex/regcomp.c
src/backend/rewrite/locks.c
src/backend/rewrite/rewriteDefine.c
src/backend/rewrite/rewriteHandler.c
src/backend/rewrite/rewriteManip.c
src/backend/rewrite/rewriteSupport.c
src/backend/storage/buffer/buf_table.c
src/backend/storage/buffer/bufmgr.c
src/backend/storage/buffer/freelist.c
src/backend/storage/file/fd.c
src/backend/storage/ipc/ipc.c
src/backend/storage/ipc/shmem.c
src/backend/storage/ipc/sinval.c
src/backend/storage/ipc/sinvaladt.c
src/backend/storage/ipc/spin.c
src/backend/storage/large_object/inv_api.c
src/backend/storage/lmgr/lmgr.c
src/backend/storage/lmgr/lock.c
src/backend/storage/lmgr/multi.c
src/backend/storage/lmgr/proc.c
src/backend/storage/page/bufpage.c
src/backend/storage/smgr/md.c
src/backend/tcop/fastpath.c
src/backend/tcop/postgres.c
src/backend/tcop/utility.c
src/backend/tioga/Varray.c
src/backend/tioga/tgRecipe.c
src/backend/utils/adt/acl.c
src/backend/utils/adt/arrayfuncs.c
src/backend/utils/adt/cash.c
src/backend/utils/adt/datetime.c
src/backend/utils/adt/datum.c
src/backend/utils/adt/dt.c
src/backend/utils/adt/filename.c
src/backend/utils/adt/geo_ops.c
src/backend/utils/adt/nabstime.c
src/backend/utils/adt/name.c
src/backend/utils/adt/not_in.c
src/backend/utils/adt/numutils.c
src/backend/utils/adt/oidint2.c
src/backend/utils/adt/oidint4.c
src/backend/utils/adt/oracle_compat.c
src/backend/utils/adt/regexp.c
src/backend/utils/adt/regproc.c
src/backend/utils/adt/selfuncs.c
src/backend/utils/adt/varchar.c
src/backend/utils/adt/varlena.c
src/backend/utils/cache/catcache.c
src/backend/utils/cache/fcache.c
src/backend/utils/cache/inval.c
src/backend/utils/cache/lsyscache.c
src/backend/utils/cache/relcache.c
src/backend/utils/cache/syscache.c
src/backend/utils/error/elog.c
src/backend/utils/fmgr/dfmgr.c
src/backend/utils/fmgr/fmgr.c
src/backend/utils/hash/dynahash.c
src/backend/utils/init/findbe.c
src/backend/utils/init/postinit.c
src/backend/utils/misc/database.c
src/backend/utils/mmgr/aset.c
src/backend/utils/mmgr/mcxt.c
src/backend/utils/mmgr/oset.c
src/backend/utils/mmgr/portalmem.c
src/backend/utils/sort/psort.c
src/backend/utils/time/tqual.c
src/bin/pg_dump/common.c
src/bin/pg_dump/pg_dump.c
src/bin/pg_id/pg_id.c
src/bin/pgtclsh/pgtclAppInit.c
src/bin/pgtclsh/pgtkAppInit.c
src/bin/psql/psql.c
src/interfaces/ecpg/lib/ecpglib.c
src/interfaces/ecpg/preproc/type.c
src/interfaces/libpgtcl/pgtclCmds.c
src/interfaces/libpq/fe-auth.c
src/interfaces/libpq/fe-connect.c
src/interfaces/libpq/fe-exec.c
src/interfaces/libpq/fe-lobj.c
src/interfaces/libpq/fe-misc.c
src/interfaces/libpq/fe-print.c
src/interfaces/libpq/pqsignal.c
src/pl/tcl/pltcl.c
src/test/examples/testlibpq.c
src/test/examples/testlibpq4.c
src/test/examples/testlo.c
src/test/examples/testlo2.c

index b97530b124db570c2be78f9baa1b262047c84a2b..9b6d9f8f4cf2df7fd142ba5f05a04ff86b155f83 100644 (file)
@@ -104,38 +104,26 @@ array_iterator(Oid elemtype, Oid proc, int and, ArrayType *array, Datum value)
                {
                        result = (int) (*proc_fn) (p, value);
                        if (typlen > 0)
-                       {
                                p += typlen;
-                       }
                        else
-                       {
                                p += INTALIGN(*(int32 *) p);
-                       }
                }
                if (result)
                {
                        if (!and)
-                       {
                                return (1);
-                       }
                }
                else
                {
                        if (and)
-                       {
                                return (0);
-                       }
                }
        }
 
        if (and && result)
-       {
                return (1);
-       }
        else
-       {
                return (0);
-       }
 }
 
 /*
index 29a2a55400a6f31ea414b30e5e28af3e45f27a7e..5138b7fa6f7d81cbfd946a07f116eeefa12dfa05 100644 (file)
@@ -97,13 +97,9 @@ hhmm_out(TimeADT *time)
        tm->tm_sec = (((int) *time) % 60);
 
        if (tm->tm_sec == 0)
-       {
                sprintf(buf, "%02d:%02d", tm->tm_hour, tm->tm_min);
-       }
        else
-       {
                sprintf(buf, "%02d:%02d:%02d", tm->tm_hour, tm->tm_min, tm->tm_sec);
-       }
 
        result = palloc(strlen(buf) + 1);
 
index 48deefd653b68535f7fd728550ccd00c24953c7b..b163fb75c6c43560683d6184b79cc4646a3ea3c9 100644 (file)
@@ -66,9 +66,7 @@ string_output(char *data, int size)
        }
 
        if (size < 0)
-       {
                size = strlen(data);
-       }
 
        /* adjust string length for escapes */
        len = size;
@@ -90,9 +88,7 @@ string_output(char *data, int size)
                                break;
                        default:
                                if (NOTPRINTABLE(*p))
-                               {
                                        len += 3;
-                               }
                }
        }
        len++;
@@ -147,9 +143,7 @@ string_output(char *data, int size)
                                        r += 3;
                                }
                                else
-                               {
                                        *r++ = c;
-                               }
                }
        }
        *r = '\0';
@@ -192,9 +186,7 @@ string_input(char *str, int size, int hdrsize, int *rtn_size)
        int                     len;
 
        if ((str == NULL) || (hdrsize < 0))
-       {
                return (char *) NULL;
-       }
 
        /* Compute result size */
        len = strlen(str);
@@ -223,22 +215,16 @@ string_input(char *str, int size, int hdrsize, int *rtn_size)
 
        /* result has variable length */
        if (size == 0)
-       {
                size = len + 1;
-       }
        else
                /* result has variable length with maximum size */
        if (size < 0)
-       {
                size = MIN(len, -size) + 1;
-       }
 
        result = (char *) palloc(hdrsize + size);
        memset(result, 0, hdrsize + size);
        if (rtn_size)
-       {
                *rtn_size = size;
-       }
 
        r = result + hdrsize;
        for (p = str; *p;)
@@ -262,13 +248,9 @@ string_input(char *str, int size, int hdrsize, int *rtn_size)
                                case '7':
                                        c = VALUE(c);
                                        if (isdigit(*p))
-                                       {
                                                c = (c << 3) + VALUE(*p++);
-                                       }
                                        if (isdigit(*p))
-                                       {
                                                c = (c << 3) + VALUE(*p++);
-                                       }
                                        *r++ = c;
                                        break;
                                case 'b':
@@ -294,9 +276,7 @@ string_input(char *str, int size, int hdrsize, int *rtn_size)
                        }
                }
                else
-               {
                        *r++ = c;
-               }
        }
 
        return ((char *) result);
@@ -380,9 +360,7 @@ c_textin(char *str)
        int                     len;
 
        if (str == NULL)
-       {
                return ((struct varlena *) NULL);
-       }
 
        result = (struct varlena *) string_input(str, 0, VARHDRSZ, &len);
        VARSIZE(result) = len;
index ded94d0d8a3b79c91bdadde359e20c6fe5c20999..ec5b756e7487088a65d0b5d1432e670d1df9f25d 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.37 1998/02/26 04:29:15 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/access/common/heaptuple.c,v 1.38 1998/06/15 19:27:44 momjian Exp $
  *
  * NOTES
  *       The old interface functions have been converted to macros
@@ -143,9 +143,7 @@ DataFill(char *data,
                if (bit != NULL)
                {
                        if (bitmask != CSIGNBIT)
-                       {
                                bitmask <<= 1;
-                       }
                        else
                        {
                                bitP += 1;
@@ -167,13 +165,9 @@ DataFill(char *data,
                        case -1:
                                *infomask |= HEAP_HASVARLENA;
                                if (att[i]->attalign == 'd')
-                               {
                                        data = (char *) DOUBLEALIGN(data);
-                               }
                                else
-                               {
                                        data = (char *) INTALIGN(data);
-                               }
                                data_length = VARSIZE(DatumGetPointer(value[i]));
                                memmove(data, DatumGetPointer(value[i]), data_length);
                                data += data_length;
@@ -239,9 +233,7 @@ heap_attisnull(HeapTuple tup, int attnum)
                return (0);
 
        if (attnum > 0)
-       {
                return (att_isnull(attnum - 1, tup->t_bits));
-       }
        else
                switch (attnum)
                {
@@ -513,9 +505,7 @@ nocachegetattr(HeapTuple tup,
                                                                        tp + att[attnum]->attcacheoff);
                }
                else if (attnum == 0)
-               {
                        return ((Datum) fetchatt(&(att[0]), (char *) tp));
-               }
                else if (!HeapTupleAllFixed(tup))
                {
                        int                     j = 0;
index 521dda8d81b67bc970bf0b6d022e060cf157066e..181f362d94f210b67263f71cd2e3ecd3b319fe33 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/access/common/indextuple.c,v 1.28 1998/02/26 04:29:18 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/access/common/indextuple.c,v 1.29 1998/06/15 19:27:44 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -178,9 +178,7 @@ nocache_index_getattr(IndexTuple tup,
                /* first attribute is always at position zero */
 
                if (attnum == 1)
-               {
                        return (Datum) fetchatt(&(att[0]), (char *) tup + data_off);
-               }
                if (att[attnum]->attcacheoff != -1)
                {
                        return (Datum) fetchatt(&(att[attnum]),
@@ -260,9 +258,7 @@ nocache_index_getattr(IndexTuple tup,
                                                                        tp + att[attnum]->attcacheoff);
                }
                else if (attnum == 0)
-               {
                        return ((Datum) fetchatt(&(att[0]), (char *) tp));
-               }
                else if (!IndexTupleAllFixed(tup))
                {
                        int                     j = 0;
@@ -482,9 +478,7 @@ CopyIndexTuple(IndexTuple source, IndexTuple *target)
 
        size = IndexTupleSize(source);
        if (*target == NULL)
-       {
                *target = (IndexTuple) palloc(size);
-       }
 
        ret = *target;
        memmove((char *) ret, (char *) source, size);
index c39cce4751afa42eeb6497c7d2875ce9027d746f..b19b35c923d963ff62fe761576806192bebb1fdc 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/access/common/Attic/indexvalid.c,v 1.18 1998/01/31 05:54:54 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/access/common/Attic/indexvalid.c,v 1.19 1998/06/15 19:27:45 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -61,9 +61,7 @@ index_keytest(IndexTuple tuple,
                }
 
                if (key[0].sk_flags & SK_ISNULL)
-               {
                        return (false);
-               }
 
                if (key[0].sk_flags & SK_COMMUTE)
                {
@@ -79,9 +77,7 @@ index_keytest(IndexTuple tuple,
                }
 
                if (!test == !(key[0].sk_flags & SK_NEGATE))
-               {
                        return (false);
-               }
 
                scanKeySize -= 1;
                key++;
index 5711d18dff303a2f3045853acabe2f5daa602ca6..39b6ebeb72ab60c77f28ae66f7fd588ecd8e4632 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.39 1998/04/26 04:05:02 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/access/common/tupdesc.c,v 1.40 1998/06/15 19:27:45 momjian Exp $
  *
  * NOTES
  *       some of the executor utility code such as "ExecTypeFromTL" should be
@@ -508,9 +508,7 @@ BuildDescForRelation(List *schema, char *relname)
                         * ----------------
                         */
                        if (!strcmp(typename, relname))
-                       {
                                TupleDescMakeSelfReference(desc, attnum, relname);
-                       }
                        else
                                elog(ERROR, "DefineRelation: no such type %s",
                                         typename);
index a510dc8b203d7cab5459feb794fa577154d62452..dc2b57d4df2ede8e36753b35401cf60f635bbd92 100644 (file)
@@ -632,9 +632,7 @@ gistAdjustKeys(Relation r,
                        pfree(datum);
        }
        else
-       {
                ReleaseBuffer(b);
-       }
        pfree(evec);
 }
 
@@ -834,9 +832,7 @@ gistSplit(Relation r,
        }
 
        if ((bufblock = BufferGetBlockNumber(buffer)) != GISTP_ROOT)
-       {
                PageRestoreTempPage(left, p);
-       }
        WriteBuffer(leftbuf);
        WriteBuffer(rightbuf);
 
index de250987755eeb695cba6c94bb091e8c6fcb736b..3832254af0b1ccc80ec7d8ed5441430c8fc9d3b3 100644 (file)
@@ -52,13 +52,9 @@ gistgettuple(IndexScanDesc s, ScanDirection dir)
 
        /* not cached, so we'll have to do some work */
        if (ItemPointerIsValid(&(s->currentItemData)))
-       {
                res = gistnext(s, dir);
-       }
        else
-       {
                res = gistfirst(s, dir);
-       }
        return (res);
 }
 
@@ -103,13 +99,9 @@ gistfirst(IndexScanDesc s, ScanDirection dir)
                        maxoff = PageGetMaxOffsetNumber(p);
 
                        if (ScanDirectionIsBackward(dir))
-                       {
                                n = OffsetNumberPrev(stk->gs_child);
-                       }
                        else
-                       {
                                n = OffsetNumberNext(stk->gs_child);
-                       }
                        so->s_stack = stk->gs_parent;
                        pfree(stk);
 
@@ -163,13 +155,9 @@ gistnext(IndexScanDesc s, ScanDirection dir)
        n = ItemPointerGetOffsetNumber(&(s->currentItemData));
 
        if (ScanDirectionIsForward(dir))
-       {
                n = OffsetNumberNext(n);
-       }
        else
-       {
                n = OffsetNumberPrev(n);
-       }
 
        b = ReadBuffer(s->relation, blk);
        p = BufferGetPage(b);
@@ -195,13 +183,9 @@ gistnext(IndexScanDesc s, ScanDirection dir)
                        po = (GISTPageOpaque) PageGetSpecialPointer(p);
 
                        if (ScanDirectionIsBackward(dir))
-                       {
                                n = OffsetNumberPrev(stk->gs_child);
-                       }
                        else
-                       {
                                n = OffsetNumberNext(stk->gs_child);
-                       }
                        so->s_stack = stk->gs_parent;
                        pfree(stk);
 
@@ -235,13 +219,9 @@ gistnext(IndexScanDesc s, ScanDirection dir)
                        po = (GISTPageOpaque) PageGetSpecialPointer(p);
 
                        if (ScanDirectionIsBackward(dir))
-                       {
                                n = PageGetMaxOffsetNumber(p);
-                       }
                        else
-                       {
                                n = FirstOffsetNumber;
-                       }
                }
        }
 }
@@ -296,9 +276,7 @@ gistindex_keytest(IndexTuple tuple,
                }
 
                if (!test == !(key[0].sk_flags & SK_NEGATE))
-               {
                        return (false);
-               }
 
                scanKeySize -= 1;
                key++;
@@ -343,13 +321,9 @@ gistfindnext(IndexScanDesc s, Page p, OffsetNumber n, ScanDirection dir)
                        break;
 
                if (ScanDirectionIsBackward(dir))
-               {
                        n = OffsetNumberPrev(n);
-               }
                else
-               {
                        n = OffsetNumberNext(n);
-               }
        }
 
        return (n);
@@ -405,9 +379,7 @@ gistheapptr(Relation r, ItemPointer itemp)
                ReleaseBuffer(b);
        }
        else
-       {
                ItemPointerSetInvalid(ip);
-       }
 
        return (ip);
 }
index e5fa6b44a2d6b5aa66f0d6c3d0e84ee7ff8da8da..7b9d49726bad18824928f91496fb1e6cc05fc222 100644 (file)
@@ -102,17 +102,11 @@ gistrescan(IndexScanDesc s, bool fromEnd, ScanKey key)
         * Set flags.
         */
        if (RelationGetNumberOfBlocks(s->relation) == 0)
-       {
                s->flags = ScanUnmarked;
-       }
        else if (fromEnd)
-       {
                s->flags = ScanUnmarked | ScanUncheckedPrevious;
-       }
        else
-       {
                s->flags = ScanUnmarked | ScanUncheckedNext;
-       }
 
        s->scanFromEnd = fromEnd;
 
@@ -276,9 +270,7 @@ gistdropscan(IndexScanDesc s)
        for (l = GISTScans;
                 l != (GISTScanList) NULL && l->gsl_scan != s;
                 l = l->gsl_next)
-       {
                prev = l;
-       }
 
        if (l == (GISTScanList) NULL)
                elog(ERROR, "GiST scan list corrupted -- cannot find 0x%lx", s);
index c72a5e6c1f8674642720feb59cf210a914675c40..8e70e456637c6da770c8efc327970e9fda336629 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/access/hash/hashinsert.c,v 1.12 1998/01/07 21:00:56 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/access/hash/hashinsert.c,v 1.13 1998/06/15 19:27:48 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -204,9 +204,7 @@ _hash_insertonpg(Relation rel,
        if (do_expand ||
                (metap->hashm_nkeys / (metap->hashm_maxbucket + 1))
                > metap->hashm_ffactor)
-       {
                _hash_expandtable(rel, metabuf);
-       }
        _hash_relbuf(rel, metabuf, HASH_READ);
        return (res);
 }
index 363d79a7462ccddde48b19a4ee4439a9eff61f5f..54178179162802dda31ab9b2e57a018bb45df766 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/access/hash/hashovfl.c,v 1.15 1998/01/07 21:01:00 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/access/hash/hashovfl.c,v 1.16 1998/06/15 19:27:49 momjian Exp $
  *
  * NOTES
  *       Overflow pages look like ordinary relation pages.
@@ -64,9 +64,7 @@ _hash_addovflpage(Relation rel, Buffer *metabufp, Buffer buf)
        /* allocate an empty overflow page */
        oaddr = _hash_getovfladdr(rel, metabufp);
        if (oaddr == InvalidOvflAddress)
-       {
                elog(ERROR, "_hash_addovflpage: problem with _hash_getovfladdr.");
-       }
        ovflblkno = OADDR_TO_BLKNO(OADDR_OF(SPLITNUM(oaddr), OPAGENUM(oaddr)));
        Assert(BlockNumberIsValid(ovflblkno));
        ovflbuf = _hash_getbuf(rel, ovflblkno, HASH_WRITE);
@@ -171,9 +169,7 @@ _hash_getovfladdr(Relation rel, Buffer *metabufp)
        if (offset > SPLITMASK)
        {
                if (++splitnum >= NCACHED)
-               {
                        elog(ERROR, OVMSG);
-               }
                metap->OVFL_POINT = splitnum;
                metap->SPARES[splitnum] = metap->SPARES[splitnum - 1];
                metap->SPARES[splitnum - 1]--;
@@ -189,9 +185,7 @@ _hash_getovfladdr(Relation rel, Buffer *metabufp)
 
                free_page++;
                if (free_page >= NCACHED)
-               {
                        elog(ERROR, OVMSG);
-               }
 
                /*
                 * This is tricky.      The 1 indicates that you want the new page
@@ -205,17 +199,13 @@ _hash_getovfladdr(Relation rel, Buffer *metabufp)
                 */
                if (_hash_initbitmap(rel, metap, OADDR_OF(splitnum, offset),
                                                         1, free_page))
-               {
                        elog(ERROR, "overflow_page: problem with _hash_initbitmap.");
-               }
                metap->SPARES[splitnum]++;
                offset++;
                if (offset > SPLITMASK)
                {
                        if (++splitnum >= NCACHED)
-                       {
                                elog(ERROR, OVMSG);
-                       }
                        metap->OVFL_POINT = splitnum;
                        metap->SPARES[splitnum] = metap->SPARES[splitnum - 1];
                        metap->SPARES[splitnum - 1]--;
@@ -252,18 +242,14 @@ found:
 
        bit = 1 + bit + (i * BMPGSZ_BIT(metap));
        if (bit >= metap->LAST_FREED)
-       {
                metap->LAST_FREED = bit - 1;
-       }
 
        /* Calculate the split number for this page */
        for (i = 0; (i < splitnum) && (bit > metap->SPARES[i]); i++)
                ;
        offset = (i ? bit - metap->SPARES[i - 1] : bit);
        if (offset >= SPLITMASK)
-       {
                elog(ERROR, OVMSG);
-       }
 
        /* initialize this page */
        oaddr = OADDR_OF(i, offset);
@@ -381,9 +367,7 @@ _hash_freeovflpage(Relation rel, Buffer ovflbuf)
                (splitnum ? metap->SPARES[splitnum - 1] : 0) + (addr & SPLITMASK) - 1;
 
        if (ovflpgno < metap->LAST_FREED)
-       {
                metap->LAST_FREED = ovflpgno;
-       }
 
        bitmappage = (ovflpgno >> (metap->BSHIFT + BYTE_TO_BIT));
        bitmapbit = ovflpgno & (BMPGSZ_BIT(metap) - 1);
@@ -403,13 +387,9 @@ _hash_freeovflpage(Relation rel, Buffer ovflbuf)
         * return that buffer with a write lock.
         */
        if (BlockNumberIsValid(nextblkno))
-       {
                return (_hash_getbuf(rel, nextblkno, HASH_WRITE));
-       }
        else
-       {
                return (InvalidBuffer);
-       }
 }
 
 
@@ -543,9 +523,7 @@ _hash_squeezebucket(Relation rel,
        {
                rblkno = ropaque->hasho_nextblkno;
                if (ropaque != wopaque)
-               {
                        _hash_relbuf(rel, rbuf, HASH_WRITE);
-               }
                rbuf = _hash_getbuf(rel, rblkno, HASH_WRITE);
                rpage = BufferGetPage(rbuf);
                _hash_checkpage(rpage, LH_OVERFLOW_PAGE);
@@ -621,9 +599,7 @@ _hash_squeezebucket(Relation rel,
                         */
                        rbuf = _hash_freeovflpage(rel, rbuf);
                        if (BufferIsValid(rbuf))
-                       {
                                _hash_relbuf(rel, rbuf, HASH_WRITE);
-                       }
 
                        if (rblkno == wblkno)
                        {
index 8773e46c4bf61473679e4c9a2c94809f8db66281..ebac11ed12e0281b3abbaa24cb73aff68ff97493 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/access/hash/hashpage.c,v 1.15 1998/01/07 21:01:08 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/access/hash/hashpage.c,v 1.16 1998/06/15 19:27:49 momjian Exp $
  *
  * NOTES
  *       Postgres hash pages look like ordinary relation pages.  The opaque
@@ -106,9 +106,7 @@ _hash_metapinit(Relation rel)
                if ((1 << i) < (metap->hashm_bsize -
                                                (DOUBLEALIGN(sizeof(PageHeaderData)) +
                                                 DOUBLEALIGN(sizeof(HashPageOpaqueData)))))
-               {
                        break;
-               }
        }
        Assert(i);
        metap->hashm_bmsize = 1 << i;
@@ -191,9 +189,7 @@ _hash_getbuf(Relation rel, BlockNumber blkno, int access)
        Buffer          buf;
 
        if (blkno == P_NEW)
-       {
                elog(ERROR, "_hash_getbuf: internal error: hash AM does not use P_NEW");
-       }
        switch (access)
        {
                case HASH_WRITE:
@@ -395,14 +391,10 @@ _hash_pagedel(Relation rel, ItemPointer tid)
        {
                buf = _hash_freeovflpage(rel, buf);
                if (BufferIsValid(buf))
-               {
                        _hash_relbuf(rel, buf, HASH_WRITE);
-               }
        }
        else
-       {
                _hash_relbuf(rel, buf, HASH_WRITE);
-       }
 
        metabuf = _hash_getbuf(rel, HASH_METAPAGE, HASH_WRITE);
        metap = (HashMetaPage) BufferGetPage(metabuf);
@@ -545,9 +537,7 @@ _hash_splitpage(Relation rel,
                opage = BufferGetPage(obuf);
                _hash_checkpage(opage, LH_OVERFLOW_PAGE);
                if (PageIsEmpty(opage))
-               {
                        elog(ERROR, "_hash_splitpage: empty overflow page %d", oblkno);
-               }
                oopaque = (HashPageOpaque) PageGetSpecialPointer(opage);
        }
 
index 848f8d9e1b4f10c62f62cfd12b26bb0153a4bab5..708dc18943ed9019ab313234f54a430383b3f1d1 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/access/hash/hashscan.c,v 1.13 1998/01/07 21:01:13 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/access/hash/hashscan.c,v 1.14 1998/06/15 19:27:50 momjian Exp $
  *
  * NOTES
  *       Because we can be doing an index scan on a relation while we
@@ -71,9 +71,7 @@ _hash_dropscan(IndexScanDesc scan)
        for (chk = HashScans;
                 chk != (HashScanList) NULL && chk->hashsl_scan != scan;
                 chk = chk->hashsl_next)
-       {
                last = chk;
-       }
 
        if (chk == (HashScanList) NULL)
                elog(ERROR, "hash scan list trashed; can't find 0x%lx", scan);
index 0ebb301c8779a2cc1f8dcc0714b56a687a140117..a3d56190605736a59307623ef0ce55df4199eaa6 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/access/hash/hashsearch.c,v 1.14 1997/09/08 21:40:52 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/access/hash/hashsearch.c,v 1.15 1998/06/15 19:27:50 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -49,9 +49,7 @@ _hash_search(Relation rel,
                bucket = 0;
        }
        else
-       {
                bucket = _hash_call(rel, metap, keyDatum);
-       }
 
        blkno = BUCKET_TO_BLKNO(bucket);
 
@@ -109,9 +107,7 @@ _hash_next(IndexScanDesc scan, ScanDirection dir)
         * next tuple, we come back with a lock on that buffer.
         */
        if (!_hash_step(scan, &buf, dir, metabuf))
-       {
                return ((RetrieveIndexResult) NULL);
-       }
 
        /* if we're here, _hash_step found a valid tuple */
        current = &(scan->currentItemData);
@@ -225,9 +221,7 @@ _hash_first(IndexScanDesc scan, ScanDirection dir)
        if (PageIsEmpty(page))
        {
                if (BlockNumberIsValid(opaque->hasho_nextblkno))
-               {
                        _hash_readnext(rel, &buf, &page, &opaque);
-               }
                else
                {
                        ItemPointerSetInvalid(current);
@@ -249,15 +243,11 @@ _hash_first(IndexScanDesc scan, ScanDirection dir)
        if (ScanDirectionIsBackward(dir))
        {
                while (BlockNumberIsValid(opaque->hasho_nextblkno))
-               {
                        _hash_readnext(rel, &buf, &page, &opaque);
-               }
        }
 
        if (!_hash_step(scan, &buf, dir, metabuf))
-       {
                return ((RetrieveIndexResult) NULL);
-       }
 
        /* if we're here, _hash_step found a valid tuple */
        current = &(scan->currentItemData);
@@ -321,13 +311,9 @@ _hash_step(IndexScanDesc scan, Buffer *bufP, ScanDirection dir, Buffer metabuf)
         */
        maxoff = PageGetMaxOffsetNumber(page);
        if (ItemPointerIsValid(current))
-       {
                offnum = ItemPointerGetOffsetNumber(current);
-       }
        else
-       {
                offnum = InvalidOffsetNumber;
-       }
 
        /*
         * 'offnum' now points to the last tuple we have seen (if any).
@@ -371,9 +357,7 @@ _hash_step(IndexScanDesc scan, Buffer *bufP, ScanDirection dir, Buffer metabuf)
                                                        Assert(opaque->hasho_bucket == bucket);
                                                        while (PageIsEmpty(page) &&
                                                         BlockNumberIsValid(opaque->hasho_nextblkno))
-                                                       {
                                                                _hash_readnext(rel, &buf, &page, &opaque);
-                                                       }
                                                        maxoff = PageGetMaxOffsetNumber(page);
                                                        offnum = FirstOffsetNumber;
                                                }
@@ -420,9 +404,7 @@ _hash_step(IndexScanDesc scan, Buffer *bufP, ScanDirection dir, Buffer metabuf)
                                                        opaque = (HashPageOpaque) PageGetSpecialPointer(page);
                                                        Assert(opaque->hasho_bucket == bucket);
                                                        while (BlockNumberIsValid(opaque->hasho_nextblkno))
-                                                       {
                                                                _hash_readnext(rel, &buf, &page, &opaque);
-                                                       }
                                                        maxoff = offnum = PageGetMaxOffsetNumber(page);
                                                }
                                                else
index 6bb6f387181b1f9aa632eab53517af82c6986336..d246f79151b4a59e9f115cb8e445f94da07367b1 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.27 1998/02/26 04:29:31 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/access/heap/heapam.c,v 1.28 1998/06/15 19:27:51 momjian Exp $
  *
  *
  * INTERFACE ROUTINES
@@ -168,9 +168,7 @@ static void
 unpinsdesc(HeapScanDesc sdesc)
 {
        if (BufferIsValid(sdesc->rs_pbuf))
-       {
                ReleaseBuffer(sdesc->rs_pbuf);
-       }
 
        /* ------------------------------------
         *      Scan will pin buffer one for each non-NULL tuple pointer
@@ -179,14 +177,10 @@ unpinsdesc(HeapScanDesc sdesc)
         * ------------------------------------
         */
        if (BufferIsValid(sdesc->rs_cbuf))
-       {
                ReleaseBuffer(sdesc->rs_cbuf);
-       }
 
        if (BufferIsValid(sdesc->rs_nbuf))
-       {
                ReleaseBuffer(sdesc->rs_nbuf);
-       }
 }
 
 /* ------------------------------------------
@@ -262,9 +256,7 @@ heapgettup(Relation relation,
 #endif                                                 /* !defined(HEAPDEBUGALL) */
 
        if (!ItemPointerIsValid(tid))
-       {
                Assert(!PointerIsValid(tid));
-       }
 
        /* ----------------
         *      return null immediately if relation is empty
@@ -313,9 +305,7 @@ heapgettup(Relation relation,
                 * ----------------
                 */
                if (ItemPointerIsValid(tid) == false)
-               {
                        tid = NULL;
-               }
                if (tid == NULL)
                {
                        page = pages - 1;       /* final page */
@@ -333,9 +323,7 @@ heapgettup(Relation relation,
                *b = RelationGetBufferWithBuffer(relation, page, *b);
 #ifndef NO_BUFFERISVALID
                if (!BufferIsValid(*b))
-               {
                        elog(ERROR, "heapgettup: failed ReadBuffer");
-               }
 #endif
 
                dp = (Page) BufferGetPage(*b);
@@ -380,9 +368,7 @@ heapgettup(Relation relation,
                *b = RelationGetBufferWithBuffer(relation, page, *b);
 #ifndef NO_BUFFERISVALID
                if (!BufferIsValid(*b))
-               {
                        elog(ERROR, "heapgettup: failed ReadBuffer");
-               }
 #endif
 
                dp = (Page) BufferGetPage(*b);
@@ -398,13 +384,9 @@ heapgettup(Relation relation,
         */
        lpp = PageGetItemId(dp, lineoff);
        if (dir < 0)
-       {
                linesleft = lineoff - 1;
-       }
        else
-       {
                linesleft = lines - lineoff;
-       }
 
        /* ----------------
         *      advance the scan until we find a qualifying tuple or
@@ -476,21 +458,15 @@ heapgettup(Relation relation,
 
 #ifndef NO_BUFFERISVALID
                if (!BufferIsValid(*b))
-               {
                        elog(ERROR, "heapgettup: failed ReadBuffer");
-               }
 #endif
                dp = (Page) BufferGetPage(*b);
                lines = lineoff = PageGetMaxOffsetNumber((Page) dp);
                linesleft = lines - 1;
                if (dir < 0)
-               {
                        lpp = PageGetItemId(dp, lineoff);
-               }
                else
-               {
                        lpp = PageGetItemId(dp, FirstOffsetNumber);
-               }
        }
 }
 
@@ -544,9 +520,7 @@ heap_open(Oid relationId)
        r = (Relation) RelationIdGetRelation(relationId);
 
        if (RelationIsValid(r) && r->rd_rel->relkind == RELKIND_INDEX)
-       {
                elog(ERROR, "%s is an index relation", r->rd_rel->relname.data);
-       }
 
        return (r);
 }
@@ -573,9 +547,7 @@ heap_openr(char *relationName)
        r = RelationNameGetRelation(relationName);
 
        if (RelationIsValid(r) && r->rd_rel->relkind == RELKIND_INDEX)
-       {
                elog(ERROR, "%s is an index relation", r->rd_rel->relname.data);
-       }
 
        return (r);
 }
@@ -1094,9 +1066,7 @@ heap_fetch(Relation relation,
         */
 
        if (PointerIsValid(b))
-       {
                *b = buffer;
-       }
        else
        {
                tuple = heap_copytuple(tuple);
@@ -1402,9 +1372,7 @@ heap_replace(Relation relation, ItemPointer otid, HeapTuple tup)
         * ----------------
         */
        if ((unsigned) DOUBLEALIGN(tup->t_len) <= PageGetFreeSpace((Page) dp))
-       {
                RelationPutHeapTuple(relation, BufferGetBlockNumber(buffer), tup);
-       }
        else
        {
                /* ----------------
@@ -1500,29 +1468,17 @@ heap_markpos(HeapScanDesc sdesc)
         * ----------------
         */
        if (sdesc->rs_ptup != NULL)
-       {
                sdesc->rs_mptid = sdesc->rs_ptup->t_ctid;
-       }
        else
-       {
                ItemPointerSetInvalid(&sdesc->rs_mptid);
-       }
        if (sdesc->rs_ctup != NULL)
-       {
                sdesc->rs_mctid = sdesc->rs_ctup->t_ctid;
-       }
        else
-       {
                ItemPointerSetInvalid(&sdesc->rs_mctid);
-       }
        if (sdesc->rs_ntup != NULL)
-       {
                sdesc->rs_mntid = sdesc->rs_ntup->t_ctid;
-       }
        else
-       {
                ItemPointerSetInvalid(&sdesc->rs_mntid);
-       }
 }
 
 /* ----------------
@@ -1568,9 +1524,7 @@ heap_restrpos(HeapScanDesc sdesc)
        sdesc->rs_nbuf = InvalidBuffer;
 
        if (!ItemPointerIsValid(&sdesc->rs_mptid))
-       {
                sdesc->rs_ptup = NULL;
-       }
        else
        {
                sdesc->rs_ptup = (HeapTuple)
@@ -1584,9 +1538,7 @@ heap_restrpos(HeapScanDesc sdesc)
        }
 
        if (!ItemPointerIsValid(&sdesc->rs_mctid))
-       {
                sdesc->rs_ctup = NULL;
-       }
        else
        {
                sdesc->rs_ctup = (HeapTuple)
@@ -1600,9 +1552,7 @@ heap_restrpos(HeapScanDesc sdesc)
        }
 
        if (!ItemPointerIsValid(&sdesc->rs_mntid))
-       {
                sdesc->rs_ntup = NULL;
-       }
        else
        {
                sdesc->rs_ntup = (HeapTuple)
index 7fc9607b441b73f53b0c180750ba6f07b0785215..229ca5d1a270a0c4b4decd1b09292ca5c8a865ab 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/access/index/genam.c,v 1.11 1998/01/07 21:01:35 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/access/index/genam.c,v 1.12 1998/06/15 19:27:53 momjian Exp $
  *
  * NOTES
  *       many of the old access method routines have been turned into
@@ -117,13 +117,9 @@ RelationGetIndexScan(Relation relation,
        ItemPointerSetInvalid(&scan->nextMarkData);
 
        if (numberOfKeys > 0)
-       {
                scan->keyData = (ScanKey) palloc(sizeof(ScanKeyData) * numberOfKeys);
-       }
        else
-       {
                scan->keyData = NULL;
-       }
 
        index_rescan(scan, scanFromEnd, key);
 
@@ -224,13 +220,9 @@ IndexScanMarkPosition(IndexScanDesc scan)
                        index_getnext(scan, BackwardScanDirection);
 
                if (result != NULL)
-               {
                        scan->previousItemData = result->index_iptr;
-               }
                else
-               {
                        ItemPointerSetInvalid(&scan->previousItemData);
-               }
 
        }
        else if (scan->flags & ScanUncheckedNext)
@@ -239,13 +231,9 @@ IndexScanMarkPosition(IndexScanDesc scan)
                        index_getnext(scan, ForwardScanDirection);
 
                if (result != NULL)
-               {
                        scan->nextItemData = result->index_iptr;
-               }
                else
-               {
                        ItemPointerSetInvalid(&scan->nextItemData);
-               }
        }
 
        scan->previousMarkData = scan->previousItemData;
index d7953a1cd8ea02c083357e38f1dad21f382d20ad..b0b0cdc452dbe2cfd9a76649c239a64d050ccd30 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/access/index/Attic/istrat.c,v 1.19 1998/04/27 04:04:09 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/access/index/Attic/istrat.c,v 1.20 1998/06/15 19:27:54 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -309,9 +309,7 @@ RelationGetStrategy(Relation relation,
        for (index = 0; index < evaluation->maxStrategy; index += 1)
        {
                if (strategyMap->entry[index].sk_procedure == procedure)
-               {
                        break;
-               }
        }
 
        if (index == evaluation->maxStrategy)
@@ -347,9 +345,7 @@ RelationGetStrategy(Relation relation,
        if (!StrategyNumberIsInBounds(strategy, evaluation->maxStrategy))
        {
                if (!StrategyNumberIsValid(strategy))
-               {
                        elog(ERROR, "RelationGetStrategy: corrupted evaluation");
-               }
        }
 
        return strategy;
@@ -465,9 +461,7 @@ RelationInvokeStrategy(Relation relation,
                                                                 (*termP)->operatorData[index].strategy);
 
                                if (!RegProcedureIsValid(entry->sk_procedure))
-                               {
                                        break;
-                               }
                        }
 
                        if (index == (*termP)->degree)
@@ -582,9 +576,7 @@ IndexSupportInitialize(IndexStrategy indexStrategy,
                if (!OidIsValid(iform->indkey[attributeIndex]))
                {
                        if (attributeIndex == 0)
-                       {
                                elog(ERROR, "IndexSupportInitialize: no pg_index tuple");
-                       }
                        break;
                }
 
@@ -621,9 +613,7 @@ IndexSupportInitialize(IndexStrategy indexStrategy,
                        loc = &indexSupport[((attributeNumber - 1) * maxSupportNumber)];
 
                        for (support = maxSupportNumber; --support >= 0;)
-                       {
                                loc[support] = InvalidOid;
-                       }
 
                        entry[1].sk_argument =
                                ObjectIdGetDatum(operatorClassObjectId[attributeNumber - 1]);
index b00dae99a0c68b2ed244354f9755e4dd32b00775..350e198514b0ccca3457dfb2cab4d94e16b30227 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.25 1998/01/15 19:42:10 pgsql Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtinsert.c,v 1.26 1998/06/15 19:27:55 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -127,9 +127,7 @@ _bt_doinsert(Relation rel, BTItem btitem, bool index_is_unique, Relation heapRel
                                }
                                /* get next offnum */
                                if (offset < maxoff)
-                               {
                                        offset = OffsetNumberNext(offset);
-                               }
                                else
                                {                               /* move right ? */
                                        if (P_RIGHTMOST(opaque))
@@ -906,13 +904,9 @@ _bt_split(Relation rel, Buffer buf, OffsetNumber firstright)
         */
 
        if (P_RIGHTMOST(ropaque))
-       {
                itemid = PageGetItemId(rightpage, P_HIKEY);
-       }
        else
-       {
                itemid = PageGetItemId(rightpage, P_FIRSTKEY);
-       }
        itemsz = ItemIdGetLength(itemid);
        item = (BTItem) PageGetItem(rightpage, itemid);
 
@@ -1178,9 +1172,7 @@ _bt_pgaddtup(Relation rel,
        first = P_RIGHTMOST(opaque) ? P_HIKEY : P_FIRSTKEY;
 
        if (afteritem == (BTItem) NULL)
-       {
                itup_off = _bt_binsrch(rel, buf, keysz, itup_scankey, BT_INSERTION);
-       }
        else
        {
                itup_off = first;
@@ -1358,9 +1350,7 @@ _bt_itemcmp(Relation rel,
                        compare = (strat == BTLessStrategyNumber) ? true : false;
                }
                else
-               {
                        compare = _bt_invokestrat(rel, i, strat, attrDatum1, attrDatum2);
-               }
 
                if (compare)                    /* true for one of ">, <, =" */
                {
@@ -1430,9 +1420,7 @@ _bt_updateitem(Relation rel,
 
        /* this should never happen (in theory) */
        if (!BTItemSame(item, oldItem))
-       {
                elog(FATAL, "_bt_getstackbuf was lying!!");
-       }
 
        /*
         * It's  defined by caller (_bt_insertonpg)
index 72e0731edd339172929fd0856a321a86c1081494..b4d1185a6018bb2069ac8301295e724d88e784fc 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtree.c,v 1.25 1998/02/26 04:29:44 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtree.c,v 1.26 1998/06/15 19:27:56 momjian Exp $
  *
  * NOTES
  *       This file contains only the public interface routines.
@@ -267,20 +267,14 @@ btbuild(Relation heap,
                 * into the btree.
                 */
                if (usefast)
-               {
                        _bt_spool(index, btitem, spool);
-               }
                else
-               {
                        res = _bt_doinsert(index, btitem, isunique, heap);
-               }
 
                pfree(btitem);
                pfree(itup);
                if (res)
-               {
                        pfree(res);
-               }
        }
 
        /* okay, all heap tuples are indexed */
index a7ae57f91a852374078ec78ffb75423a73a65480..8fc6e736c69df3151db0e497b6ad4cc2d0f31b83 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/access/nbtree/Attic/nbtscan.c,v 1.13 1998/02/28 13:53:18 vadim Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/access/nbtree/Attic/nbtscan.c,v 1.14 1998/06/15 19:27:57 momjian Exp $
  *
  *
  * NOTES
@@ -72,9 +72,7 @@ _bt_dropscan(IndexScanDesc scan)
        for (chk = BTScans;
                 chk != (BTScanList) NULL && chk->btsl_scan != scan;
                 chk = chk->btsl_next)
-       {
                last = chk;
-       }
 
        if (chk == (BTScanList) NULL)
                elog(ERROR, "btree scan list trashed; can't find 0x%lx", scan);
index d11874d56d2db49f55f6f9fa62a4c54126ffc230..633a310ea1a98bc06a20fcb84f953bb753d80c67 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtsearch.c,v 1.35 1998/05/13 03:44:23 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtsearch.c,v 1.36 1998/06/15 19:27:58 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -541,9 +541,7 @@ _bt_firsteq(Relation rel,
        while (offnum > limit
                   && _bt_compare(rel, itupdesc, page,
                                                  keysz, scankey, OffsetNumberPrev(offnum)) == 0)
-       {
                offnum = OffsetNumberPrev(offnum);
-       }
 
        return (offnum);
 }
@@ -616,9 +614,7 @@ _bt_compare(Relation rel,
                 * - see new comments above...
                 */
                if (!P_RIGHTMOST(opaque))
-               {
                        elog(ERROR, "_bt_compare: invalid comparison to high key");
-               }
 
 #if 0
 
@@ -634,9 +630,7 @@ _bt_compare(Relation rel,
 
                if (_bt_skeycmp(rel, keysz, scankey, page, itemid,
                                                BTEqualStrategyNumber))
-               {
                        return (0);
-               }
                return (1);
 #endif
        }
@@ -676,9 +670,7 @@ _bt_compare(Relation rel,
                        tmpres = (long) -1; /* NOT_NULL "<" NULL */
                }
                else
-               {
                        tmpres = (long) FMGR_PTR2(&entry->sk_func, entry->sk_argument, datum);
-               }
                result = tmpres;
 
                /* if the keys are unequal, return the difference */
@@ -1090,9 +1082,7 @@ _bt_step(IndexScanDesc scan, Buffer *bufP, ScanDirection dir)
        if (ScanDirectionIsForward(dir))
        {
                if (!PageIsEmpty(page) && offnum < maxoff)
-               {
                        offnum = OffsetNumberNext(offnum);
-               }
                else
                {
 
@@ -1119,9 +1109,7 @@ _bt_step(IndexScanDesc scan, Buffer *bufP, ScanDirection dir)
                                        start = P_RIGHTMOST(opaque) ? P_HIKEY : P_FIRSTKEY;
 
                                        if (!PageIsEmpty(page) && start <= maxoff)
-                                       {
                                                break;
-                                       }
                                        else
                                        {
                                                blkno = opaque->btpo_next;
@@ -1145,9 +1133,7 @@ _bt_step(IndexScanDesc scan, Buffer *bufP, ScanDirection dir)
                start = P_RIGHTMOST(opaque) ? P_HIKEY : P_FIRSTKEY;
 
                if (offnum > start)
-               {
                        offnum = OffsetNumberPrev(offnum);
-               }
                else
                {
 
@@ -1196,9 +1182,7 @@ _bt_step(IndexScanDesc scan, Buffer *bufP, ScanDirection dir)
 
                                        /* anything to look at here? */
                                        if (!PageIsEmpty(page) && maxoff >= start)
-                                       {
                                                break;
-                                       }
                                        else
                                        {
                                                blkno = opaque->btpo_prev;
@@ -1278,13 +1262,9 @@ _bt_twostep(IndexScanDesc scan, Buffer *bufP, ScanDirection dir)
 
        /* if we've hit end of scan we don't have to do any work */
        if (ScanDirectionIsForward(dir) && P_RIGHTMOST(opaque))
-       {
                return (false);
-       }
        else if (ScanDirectionIsBackward(dir) && P_LEFTMOST(opaque))
-       {
                return (false);
-       }
 
        /*
         * Okay, it's off the page; let _bt_step() do the hard work, and we'll
@@ -1371,13 +1351,9 @@ _bt_endpoint(IndexScanDesc scan, ScanDirection dir)
                        break;
 
                if (ScanDirectionIsForward(dir))
-               {
                        offnum = P_RIGHTMOST(opaque) ? P_HIKEY : P_FIRSTKEY;
-               }
                else
-               {
                        offnum = PageGetMaxOffsetNumber(page);
-               }
 
                btitem = (BTItem) PageGetItem(page, PageGetItemId(page, offnum));
                itup = &(btitem->bti_itup);
@@ -1461,9 +1437,7 @@ _bt_endpoint(IndexScanDesc scan, ScanDirection dir)
                }
                /* new stuff ends here */
                else
-               {
                        ItemPointerSet(current, blkno, start);
-               }
        }
        else if (ScanDirectionIsBackward(dir))
        {
@@ -1510,9 +1484,7 @@ _bt_endpoint(IndexScanDesc scan, ScanDirection dir)
                }
        }
        else
-       {
                elog(ERROR, "Illegal scan direction %d", dir);
-       }
 
        btitem = (BTItem) PageGetItem(page, PageGetItemId(page, start));
        itup = &(btitem->bti_itup);
index b6f7b337a9592215ce4fb7ae3f1795bb52359faf..12effb71eb42dff78caeea073550e45cccce8e3c 100644 (file)
@@ -5,7 +5,7 @@
  *
  *
  * IDENTIFICATION
- *       $Id: nbtsort.c,v 1.29 1998/02/26 04:29:54 momjian Exp $
+ *       $Id: nbtsort.c,v 1.30 1998/06/15 19:27:59 momjian Exp $
  *
  * NOTES
  *
@@ -288,9 +288,7 @@ _bt_pqsift(BTPriQueue *q, int parent)
                if (child < q->btpq_nelem - 1)
                {
                        if (GREATER(&(q->btpq_queue[child]), &(q->btpq_queue[child + 1])))
-                       {
                                ++child;
-                       }
                }
                if (GREATER(&(q->btpq_queue[parent]), &(q->btpq_queue[child])))
                {
@@ -300,9 +298,7 @@ _bt_pqsift(BTPriQueue *q, int parent)
                        parent = child;
                }
                else
-               {
                        parent = child + 1;
-               }
        }
 }
 
@@ -331,18 +327,14 @@ _bt_pqadd(BTPriQueue *q, BTPriQueueElem *e)
                                parent;
 
        if (q->btpq_nelem >= MAXELEM)
-       {
                elog(ERROR, "_bt_pqadd: queue overflow");
-       }
 
        child = q->btpq_nelem++;
        while (child > 0)
        {
                parent = child / 2;
                if (GREATER(e, &(q->btpq_queue[parent])))
-               {
                        break;
-               }
                else
                {
                        q->btpq_queue[child] = q->btpq_queue[parent];           /* struct = */
@@ -424,9 +416,7 @@ _bt_tapecreate(char *fname)
        BTTapeBlock *tape = (BTTapeBlock *) palloc(sizeof(BTTapeBlock));
 
        if (tape == (BTTapeBlock *) NULL)
-       {
                elog(ERROR, "_bt_tapecreate: out of memory");
-       }
 
        tape->bttb_magic = BTTAPEMAGIC;
 
@@ -516,9 +506,7 @@ _bt_tapenext(BTTapeBlock *tape, char **pos)
        BTItem          bti;
 
        if (*pos >= tape->bttb_data + tape->bttb_top)
-       {
                return ((BTItem) NULL);
-       }
        bti = (BTItem) *pos;
        itemsz = BTITEMSZ(bti);
        *pos += DOUBLEALIGN(itemsz);
@@ -561,9 +549,7 @@ _bt_spoolinit(Relation index, int ntapes, bool isunique)
        char       *fname = (char *) palloc(sizeof(TAPETEMP) + 1);
 
        if (btspool == (BTSpool *) NULL || fname == (char *) NULL)
-       {
                elog(ERROR, "_bt_spoolinit: out of memory");
-       }
        MemSet((char *) btspool, 0, sizeof(BTSpool));
        btspool->bts_ntapes = ntapes;
        btspool->bts_tape = 0;
@@ -575,9 +561,7 @@ _bt_spoolinit(Relation index, int ntapes, bool isunique)
                (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)
        {
@@ -621,9 +605,7 @@ _bt_spoolflush(BTSpool *btspool)
        for (i = 0; i < btspool->bts_ntapes; ++i)
        {
                if (!EMPTYTAPE(btspool->bts_otape[i]))
-               {
                        _bt_tapewrite(btspool->bts_otape[i], 1);
-               }
        }
 }
 
@@ -716,9 +698,7 @@ _bt_spool(Relation index, BTItem btitem, void *spool)
                                (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]));
-                       }
 
                        /*
                         * qsort the pointer array.
@@ -790,9 +770,7 @@ _bt_spool(Relation index, BTItem btitem, void *spool)
 
        /* insert this item into the current buffer */
        if (btitem != (BTItem) NULL)
-       {
                _bt_tapeadd(itape, btitem, itemsz);
-       }
 }
 
 /*
@@ -1008,9 +986,7 @@ _bt_buildadd(Relation index, void *pstate, BTItem bti, int flags)
                 * shuffling).
                 */
                for (o = last_off; o > first_off; o = OffsetNumberPrev(o))
-               {
                        PageIndexTupleDelete(opage, o);
-               }
                hii = PageGetItemId(opage, P_HIKEY);
                ii = PageGetItemId(opage, first_off);
                *hii = *ii;
@@ -1085,14 +1061,10 @@ _bt_buildadd(Relation index, void *pstate, BTItem bti, int flags)
 #endif                                                 /* FASTBUILD_DEBUG && FASTBUILD_MERGE */
 #endif
        if (last_bti == (BTItem) NULL)
-       {
                first_off = P_FIRSTKEY;
-       }
        else if (!_bt_itemcmp(index, _bt_nattr,
                                                  bti, last_bti, BTEqualStrategyNumber))
-       {
                first_off = off;
-       }
        last_off = off;
        last_bti = (BTItem) PageGetItem(npage, PageGetItemId(npage, off));
 
@@ -1226,9 +1198,7 @@ _bt_merge(Relation index, BTSpool *btspool)
                                do
                                {
                                        if (_bt_taperead(itape) == 0)
-                                       {
                                                tapedone[t] = 1;
-                                       }
                                } while (!tapedone[t] && EMPTYTAPE(itape));
                                if (!tapedone[t])
                                {
@@ -1237,9 +1207,7 @@ _bt_merge(Relation index, BTSpool *btspool)
                                        _bt_setsortkey(index, _bt_tapenext(itape, &tapepos[t]),
                                                                   &(e.btpqe_item));
                                        if (e.btpqe_item.btsk_item != (BTItem) NULL)
-                                       {
                                                _bt_pqadd(&q, &e);
-                                       }
                                }
                        }
 
@@ -1334,9 +1302,7 @@ _bt_merge(Relation index, BTSpool *btspool)
                                                do
                                                {
                                                        if (_bt_taperead(itape) == 0)
-                                                       {
                                                                tapedone[t] = 1;
-                                                       }
                                                } while (!tapedone[t] && EMPTYTAPE(itape));
                                                if (!tapedone[t])
                                                {
@@ -1372,9 +1338,7 @@ _bt_merge(Relation index, BTSpool *btspool)
                 * pages instead of merging into a tape file.
                 */
                if (nruns <= btspool->bts_ntapes)
-               {
                        doleaf = true;
-               }
        } while (nruns > 0);            /* pass */
 
        _bt_uppershutdown(index, state);
index 652f1c69782796b5ee2ed80b9f57fc901efbe280..f4fd602898c899c19e08c08575024ffe5e31eded 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtutils.c,v 1.19 1998/04/27 04:04:21 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/access/nbtree/nbtutils.c,v 1.20 1998/06/15 19:27:59 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -157,9 +157,7 @@ _bt_orderkeys(Relation relation, BTScanOpaque so)
                if (i == numberOfKeys || cur->sk_attno != attno)
                {
                        if (cur->sk_attno != attno + 1 && i < numberOfKeys)
-                       {
                                elog(ERROR, "_bt_orderkeys: key(s) for attribute %d missed", attno + 1);
-                       }
 
                        /*
                         * If = has been specified, no other key will be used. In case
@@ -373,9 +371,7 @@ _bt_checkkeys(IndexScanDesc scan, IndexTuple tuple, Size *keysok)
 
                /* btree doesn't support 'A is null' clauses, yet */
                if (isNull || key[0].sk_flags & SK_ISNULL)
-               {
                        return (false);
-               }
 
                if (key[0].sk_flags & SK_COMMUTE)
                {
@@ -391,9 +387,7 @@ _bt_checkkeys(IndexScanDesc scan, IndexTuple tuple, Size *keysok)
                }
 
                if (!test == !(key[0].sk_flags & SK_NEGATE))
-               {
                        return (false);
-               }
 
                keysz -= 1;
                key++;
index 6a13b81a1f9a62f1cec4007e476629b2e6f47bfc..eb9d43943edb51237a17972701ec6a9ebd0e1387 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtget.c,v 1.9 1997/09/08 02:21:03 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtget.c,v 1.10 1998/06/15 19:28:00 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -47,13 +47,9 @@ rtgettuple(IndexScanDesc s, ScanDirection dir)
 
        /* not cached, so we'll have to do some work */
        if (ItemPointerIsValid(&(s->currentItemData)))
-       {
                res = rtnext(s, dir);
-       }
        else
-       {
                res = rtfirst(s, dir);
-       }
        return (res);
 }
 
@@ -98,13 +94,9 @@ rtfirst(IndexScanDesc s, ScanDirection dir)
                        maxoff = PageGetMaxOffsetNumber(p);
 
                        if (ScanDirectionIsBackward(dir))
-                       {
                                n = OffsetNumberPrev(stk->rts_child);
-                       }
                        else
-                       {
                                n = OffsetNumberNext(stk->rts_child);
-                       }
                        so->s_stack = stk->rts_parent;
                        pfree(stk);
 
@@ -158,13 +150,9 @@ rtnext(IndexScanDesc s, ScanDirection dir)
        n = ItemPointerGetOffsetNumber(&(s->currentItemData));
 
        if (ScanDirectionIsForward(dir))
-       {
                n = OffsetNumberNext(n);
-       }
        else
-       {
                n = OffsetNumberPrev(n);
-       }
 
        b = ReadBuffer(s->relation, blk);
        p = BufferGetPage(b);
@@ -190,13 +178,9 @@ rtnext(IndexScanDesc s, ScanDirection dir)
                        po = (RTreePageOpaque) PageGetSpecialPointer(p);
 
                        if (ScanDirectionIsBackward(dir))
-                       {
                                n = OffsetNumberPrev(stk->rts_child);
-                       }
                        else
-                       {
                                n = OffsetNumberNext(stk->rts_child);
-                       }
                        so->s_stack = stk->rts_parent;
                        pfree(stk);
 
@@ -230,13 +214,9 @@ rtnext(IndexScanDesc s, ScanDirection dir)
                        po = (RTreePageOpaque) PageGetSpecialPointer(p);
 
                        if (ScanDirectionIsBackward(dir))
-                       {
                                n = PageGetMaxOffsetNumber(p);
-                       }
                        else
-                       {
                                n = FirstOffsetNumber;
-                       }
                }
        }
 }
@@ -283,13 +263,9 @@ findnext(IndexScanDesc s, Page p, OffsetNumber n, ScanDirection dir)
                }
 
                if (ScanDirectionIsBackward(dir))
-               {
                        n = OffsetNumberPrev(n);
-               }
                else
-               {
                        n = OffsetNumberNext(n);
-               }
        }
 
        return (n);
@@ -345,9 +321,7 @@ rtheapptr(Relation r, ItemPointer itemp)
                ReleaseBuffer(b);
        }
        else
-       {
                ItemPointerSetInvalid(ip);
-       }
 
        return (ip);
 }
index 4968162f761e1b0e1d445f03cd929401dcb13a16..57217b050b3db1f2f7db76ce2adfa95fcf6e1867 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtree.c,v 1.23 1998/02/26 04:30:15 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtree.c,v 1.24 1998/06/15 19:28:01 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -450,9 +450,7 @@ rttighten(Relation r,
                        memmove(oldud, datum, VARSIZE(datum));
                }
                else
-               {
                        memmove(oldud, datum, att_size);
-               }
                WriteBuffer(b);
 
                /*
@@ -467,9 +465,7 @@ rttighten(Relation r,
                pfree(tdatum);
        }
        else
-       {
                ReleaseBuffer(b);
-       }
        pfree(datum);
 }
 
@@ -587,9 +583,7 @@ dosplit(Relation r,
        }
 
        if ((bufblock = BufferGetBlockNumber(buffer)) != P_ROOT)
-       {
                PageRestoreTempPage(left, p);
-       }
        WriteBuffer(leftbuf);
        WriteBuffer(rightbuf);
 
@@ -842,13 +836,9 @@ picksplit(Relation r,
 
                /* okay, which page needs least enlargement? */
                if (i == maxoff)
-               {
                        item_1 = itup;
-               }
                else
-               {
                        item_1 = (IndexTuple) PageGetItem(page, PageGetItemId(page, i));
-               }
 
                datum_alpha = ((char *) item_1) + sizeof(IndexTupleData);
                union_dl = (char *) (*fmgr_faddr(&rtstate->unionFn)) (datum_l, datum_alpha);
index 2d47500e98252085ba3baf23bef9deb30ac7ee29..672d0e2005fa8c30c314b2d0b3fffb3b8e9105f8 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtscan.c,v 1.15 1998/01/07 21:02:11 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/access/rtree/Attic/rtscan.c,v 1.16 1998/06/15 19:28:01 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -104,17 +104,11 @@ rtrescan(IndexScanDesc s, bool fromEnd, ScanKey key)
         * Set flags.
         */
        if (RelationGetNumberOfBlocks(s->relation) == 0)
-       {
                s->flags = ScanUnmarked;
-       }
        else if (fromEnd)
-       {
                s->flags = ScanUnmarked | ScanUncheckedPrevious;
-       }
        else
-       {
                s->flags = ScanUnmarked | ScanUncheckedNext;
-       }
 
        s->scanFromEnd = fromEnd;
 
@@ -133,9 +127,7 @@ rtrescan(IndexScanDesc s, bool fromEnd, ScanKey key)
                p->s_stack = p->s_markstk = (RTSTACK *) NULL;
                p->s_flags = 0x0;
                for (i = 0; i < s->numberOfKeys; i++)
-               {
                        p->s_internalKey[i].sk_argument = s->keyData[i].sk_argument;
-               }
        }
        else
        {
@@ -279,9 +271,7 @@ rtdropscan(IndexScanDesc s)
        for (l = RTScans;
                 l != (RTScanList) NULL && l->rtsl_scan != s;
                 l = l->rtsl_next)
-       {
                prev = l;
-       }
 
        if (l == (RTScanList) NULL)
                elog(ERROR, "rtree scan list corrupted -- cannot find 0x%lx", s);
index a88bd514b9f0f6661ed4ad8b945dba138649ee7f..fb888640a9951061b300f2a6bf21b10b46f7f0cc 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.19 1998/01/07 21:02:24 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/access/transam/xact.c,v 1.20 1998/06/15 19:28:02 momjian Exp $
  *
  * NOTES
  *             Transaction aborts can now occur two ways:
@@ -1450,9 +1450,7 @@ IsTransactionBlock()
 
        if (s->blockState == TBLOCK_INPROGRESS
                || s->blockState == TBLOCK_ENDABORT)
-       {
                return (true);
-       }
 
        return (false);
 }
index d2e6fff5bbdf62e93f1e34ee0d33b53f4b52594e..85afd7874687eae8b02276cf6d6750bc387a0c0b 100644 (file)
@@ -7,7 +7,7 @@
  * Copyright (c) 1994, Regents of the University of California
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.42 1998/05/29 17:00:05 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/bootstrap/bootstrap.c,v 1.43 1998/06/15 19:28:04 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -349,13 +349,9 @@ BootstrapMain(int argc, char *argv[])
        }                                                       /* while */
 
        if (argc - optind > 1)
-       {
                usage();
-       }
        else if (argc - optind == 1)
-       {
                dbName = argv[optind];
-       }
 
        if (!DataDir)
        {
@@ -485,9 +481,7 @@ boot_openrel(char *relname)
        }
 
        if (reldesc != NULL)
-       {
                closerel(NULL);
-       }
 
        if (!Quiet)
                printf("Amopen: relation %s. attrsize %d\n", relname ? relname : "(null)",
@@ -499,9 +493,7 @@ boot_openrel(char *relname)
        for (i = 0; i < numattr; i++)
        {
                if (attrtypes[i] == NULL)
-               {
                        attrtypes[i] = AllocateAttribute();
-               }
                memmove((char *) attrtypes[i],
                                (char *) reldesc->rd_att->attrs[i],
                                ATTRIBUTE_TUPLE_SIZE);
@@ -553,9 +545,7 @@ closerel(char *name)
        }
 
        if (reldesc == NULL)
-       {
                elog(ERROR, "Warning: no opened relation to close.\n");
-       }
        else
        {
                if (!Quiet)
@@ -639,9 +629,7 @@ InsertOneTuple(Oid objectid)
        pfree(tupDesc);                         /* just free's tupDesc, not the attrtypes */
 
        if (objectid != (Oid) 0)
-       {
                tuple->t_oid = objectid;
-       }
        heap_insert(reldesc, tuple);
        pfree(tuple);
        if (DebugMode)
@@ -735,9 +723,7 @@ InsertOneNull(int i)
        if (DebugMode)
                printf("Inserting null\n");
        if (i < 0 || i >= MAXATTR)
-       {
                elog(FATAL, "i out of range (too many attrs): %d\n", i);
-       }
        values[i] = (char *) NULL;
        Blanks[i] = 'n';
 }
@@ -787,9 +773,7 @@ cleanup()
                exitpg(1);
        }
        if (reldesc != (Relation) NULL)
-       {
                heap_close(reldesc);
-       }
        CommitTransactionCommand();
        exitpg(Warnings);
 }
@@ -823,9 +807,7 @@ gettype(char *type)
                for (i = 0; i <= n_types; i++)
                {
                        if (strncmp(type, Procid[i].name, NAMEDATALEN) == 0)
-                       {
                                return (i);
-                       }
                }
                if (DebugMode)
                        printf("bootstrap.c: External Type: %s\n", type);
@@ -869,9 +851,7 @@ AllocateAttribute()
        (AttributeTupleForm) malloc(ATTRIBUTE_TUPLE_SIZE);
 
        if (!PointerIsValid(attribute))
-       {
                elog(FATAL, "AllocateAttribute: malloc failed");
-       }
        MemSet(attribute, 0, ATTRIBUTE_TUPLE_SIZE);
 
        return (attribute);
@@ -928,9 +908,7 @@ EnterString(char *str)
 
        node = FindStr(str, len, 0);
        if (node)
-       {
                return (node->strnum);
-       }
        else
        {
                node = AddStr(str, len, 0);
@@ -997,9 +975,7 @@ FindStr(char *str, int length, hashnode *mderef)
                        return (node);          /* no need to check */
                }
                else
-               {
                        node = node->next;
-               }
        }
        /* Couldn't find it in the list */
        return (NULL);
@@ -1056,9 +1032,7 @@ AddStr(char *str, int strlength, int mderef)
 
        hashresult = CompHash(str, strlength);
        if (hashtable[hashresult] == NULL)
-       {
                hashtable[hashresult] = newnode;
-       }
        else
        {                                                       /* There is something in the list */
                trail = hashtable[hashresult];
@@ -1135,9 +1109,7 @@ index_register(char *heap,
                }
        }
        else
-       {
                newind->il_params = (Datum *) NULL;
-       }
 
        if (finfo != (FuncIndexInfo *) NULL)
        {
@@ -1145,9 +1117,7 @@ index_register(char *heap,
                memmove(newind->il_finfo, finfo, sizeof(FuncIndexInfo));
        }
        else
-       {
                newind->il_finfo = (FuncIndexInfo *) NULL;
-       }
 
        if (predInfo != NULL)
        {
@@ -1156,9 +1126,7 @@ index_register(char *heap,
                newind->il_predInfo->oldPred = predInfo->oldPred;
        }
        else
-       {
                newind->il_predInfo = NULL;
-       }
 
        newind->il_next = ILHead;
 
index 14fb51fdd30c559eb9a3045785f4a5dcaaf9e8bc..c14065d7a5baddb21027f2377245d85fbaa18745 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/catalog/aclchk.c,v 1.10 1998/05/09 23:42:58 thomas Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/catalog/aclchk.c,v 1.11 1998/06/15 19:28:06 momjian Exp $
  *
  * NOTES
  *       See acl.h.
@@ -200,13 +200,9 @@ get_grosysid(char *groname)
        htp = SearchSysCacheTuple(GRONAME, PointerGetDatum(groname),
                                                          0, 0, 0);
        if (HeapTupleIsValid(htp))
-       {
                id = ((Form_pg_group) GETSTRUCT(htp))->grosysid;
-       }
        else
-       {
                elog(ERROR, "non-existent group \"%s\"", groname);
-       }
        return (id);
 }
 
@@ -219,13 +215,9 @@ get_groname(AclId grosysid)
        htp = SearchSysCacheTuple(GROSYSID, PointerGetDatum(grosysid),
                                                          0, 0, 0);
        if (HeapTupleIsValid(htp))
-       {
                name = (((Form_pg_group) GETSTRUCT(htp))->groname).data;
-       }
        else
-       {
                elog(NOTICE, "get_groname: group %d not found", grosysid);
-       }
        return (name);
 }
 
@@ -267,9 +259,7 @@ in_group(AclId uid, AclId gid)
                        }
        }
        else
-       {
                elog(NOTICE, "in_group: group %d not found", gid);
-       }
        heap_close(relation);
        return (found);
 }
@@ -290,9 +280,7 @@ aclcheck(char *relname, Acl *acl, AclId id, AclIdType idtype, AclMode mode)
 
        /* if no acl is found, use world default */
        if (!acl)
-       {
                acl = acldefault(relname);
-       }
 
        num = ACL_NUM(acl);
        aidat = ACL_DAT(acl);
index 62fc9d076bd36ab5046e8b35e46b2ea560e9cccf..33a22f25aad95aba8d274e0628b6c82aa096d618 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.50 1998/06/14 13:31:07 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.51 1998/06/15 19:28:07 momjian Exp $
  *
  * INTERFACE ROUTINES
  *             heap_create()                   - Create an uncataloged heap relation
@@ -291,9 +291,7 @@ heap_create(char *name,
                rdesc->rd_rel->relchecks = tupDesc->constr->num_check;
 
        for (i = 0; i < natts; i++)
-       {
                rdesc->rd_att->attrs[i]->attrelid = relid;
-       }
 
        rdesc->rd_id = relid;
 
@@ -933,9 +931,7 @@ RelationRemoveInheritance(Relation relation)
        {
                tuple = heap_getnext(scan, 0, (Buffer *) NULL);
                if (!HeapTupleIsValid(tuple))
-               {
                        break;
-               }
                heap_delete(catalogRelation, &tuple->t_ctid);
        }
 
@@ -961,9 +957,7 @@ RelationRemoveInheritance(Relation relation)
        {
                tuple = heap_getnext(scan, 0, (Buffer *) NULL);
                if (!HeapTupleIsValid(tuple))
-               {
                        break;
-               }
                heap_delete(catalogRelation, &tuple->t_ctid);
        }
 
@@ -1000,9 +994,7 @@ RelationRemoveIndexes(Relation relation)
        {
                tuple = heap_getnext(scan, 0, (Buffer *) NULL);
                if (!HeapTupleIsValid(tuple))
-               {
                        break;
-               }
 
                index_destroy(((IndexTupleForm) GETSTRUCT(tuple))->indexrelid);
        }
index 69a71858c16bb4e92755fa30d65b3b1cde4fad43..463cbf17542d5ea849b0536595dfb1b2bb37bd7d 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.42 1998/06/13 20:22:54 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/catalog/index.c,v 1.43 1998/06/15 19:28:09 momjian Exp $
  *
  *
  * INTERFACE ROUTINES
@@ -190,9 +190,7 @@ RelationNameGetObjectId(char *relationName,
        pg_class_tuple = heap_getnext(pg_class_scan, 0, &buffer);
 
        if (!HeapTupleIsValid(pg_class_tuple))
-       {
                relationObjectId = InvalidOid;
-       }
        else
        {
                relationObjectId = pg_class_tuple->t_oid;
@@ -385,9 +383,7 @@ ConstructTupleDescriptor(Oid heapoid,
                        IndexKeyType = IndexKey->tname;
                }
                else
-               {
                        IndexKeyType = NULL;
-               }
 
                indexTupDesc->attrs[i] = (AttributeTupleForm) palloc(ATTRIBUTE_TUPLE_SIZE);
 
@@ -805,9 +801,7 @@ UpdateIndexRelation(Oid indexoid,
                pfree(predString);
        }
        else
-       {
                predText = (text *) fmgr(F_TEXTIN, "");
-       }
        predLen = VARSIZE(predText);
        itupLen = predLen + sizeof(FormData_pg_index);
        indexForm = (IndexTupleForm) palloc(itupLen);
@@ -942,9 +936,7 @@ UpdateIndexPredicate(Oid indexoid, Node *oldPred, Node *predicate)
                pfree(predString);
        }
        else
-       {
                predText = (text *) fmgr(F_TEXTIN, "");
-       }
 
        /* open the index system catalog relation */
        pg_index = heap_openr(IndexRelationName);
@@ -1027,9 +1019,7 @@ InitIndexStrategy(int numatts,
                                                                                                          strsize);
        }
        else
-       {
                support = (RegProcedure *) NULL;
-       }
 
        /* ----------------
         *      fill in the index strategy structure with information
@@ -1269,9 +1259,7 @@ index_destroy(Oid indexId)
 
        while (tuple = heap_getnext(scan, 0, (Buffer *) NULL),
                   HeapTupleIsValid(tuple))
-       {
                heap_delete(catalogRelation, &tuple->t_ctid);
-       }
        heap_endscan(scan);
        heap_close(catalogRelation);
 
@@ -1410,9 +1398,7 @@ UpdateStats(Oid relid, long reltuples, bool hasindex)
         */
        pg_class = heap_openr(RelationRelationName);
        if (!RelationIsValid(pg_class))
-       {
                elog(ERROR, "UpdateStats: could not open RELATION relation");
-       }
        key[0].sk_argument = ObjectIdGetDatum(relid);
 
        pg_class_scan =
index 51ba1ae9bf1fd80b84c19b0d44b4803b84efa561..7fc091b118d835aea3eab9dfa784266e3475ecbf 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/catalog/indexing.c,v 1.17 1998/04/27 04:04:58 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/catalog/indexing.c,v 1.18 1998/06/15 19:28:09 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -80,9 +80,7 @@ CatalogOpenIndices(int nIndices, char *names[], Relation idescs[])
        int                     i;
 
        for (i = 0; i < nIndices; i++)
-       {
                idescs[i] = index_openr(names[i]);
-       }
 }
 
 /*
index f8fe2431d239f77a2d83d2358b47d754d7957067..44506a35c44e09cf22aac13a15b2dbf9f405b3d8 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/catalog/pg_proc.c,v 1.17 1998/04/27 04:05:03 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/catalog/pg_proc.c,v 1.18 1998/06/15 19:28:10 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -94,9 +94,7 @@ ProcedureCreate(char *procedureName,
                if (strcmp(strVal(t), "opaque") == 0)
                {
                        if (strcmp(languageName, "sql") == 0)
-                       {
                                elog(ERROR, "ProcedureDefine: sql functions cannot take type \"opaque\"");
-                       }
                        toid = 0;
                }
                else
@@ -162,9 +160,7 @@ ProcedureCreate(char *procedureName,
        if (strcmp(returnTypeName, "opaque") == 0)
        {
                if (strcmp(languageName, "sql") == 0)
-               {
                        elog(ERROR, "ProcedureCreate: sql functions cannot return type \"opaque\"");
-               }
                typeObjectId = 0;
        }
 
index c67cbe1546988df0f45961acf131bd440a021916..dac435f17f401113dee09015878485bf92b43c84 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/catalog/pg_type.c,v 1.24 1998/05/09 23:43:00 thomas Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/catalog/pg_type.c,v 1.25 1998/06/15 19:28:10 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -334,9 +334,7 @@ TypeCreate(char *typeName,
         */
        typeObjectId = TypeGet(typeName, &defined);
        if (OidIsValid(typeObjectId) && defined)
-       {
                elog(ERROR, "TypeCreate: type %s already defined", typeName);
-       }
 
        /* ----------------
         *      if this type has an associated elementType, then we check that
@@ -347,9 +345,7 @@ TypeCreate(char *typeName,
        {
                elementObjectId = TypeGet(elementTypeName, &defined);
                if (!defined)
-               {
                        elog(ERROR, "TypeCreate: type %s is not defined", elementTypeName);
-               }
        }
 
        /* ----------------
@@ -437,9 +433,7 @@ TypeCreate(char *typeName,
                                                                                  0);
                        }
                        if (!HeapTupleIsValid(tup))
-                       {
                                func_error("TypeCreate", procname, 1, argList, NULL);
-                       }
                }
 
                values[i++] = (Datum) tup->t_oid;               /* 11 - 14 */
@@ -559,9 +553,7 @@ TypeRename(char *oldTypeName, char *newTypeName)
        /* check that that the new type is not already defined */
        type_oid = TypeGet(newTypeName, &defined);
        if (OidIsValid(type_oid) && defined)
-       {
                elog(ERROR, "TypeRename: type %s already defined", newTypeName);
-       }
 
        /* get the type tuple from the catalog index scan manager */
        pg_type_desc = heap_openr(TypeRelationName);
@@ -592,9 +584,7 @@ TypeRename(char *oldTypeName, char *newTypeName)
 
        }
        else
-       {
                elog(ERROR, "TypeRename: type %s not defined", oldTypeName);
-       }
 
        /* finish up */
        heap_close(pg_type_desc);
index 7ae5a716013e1d401e15ff8886e1c575b513b3e4..8f07001440a511c0d3353815e55d04d0f948e7c4 100644 (file)
@@ -10,7 +10,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/commands/_deadcode/Attic/version.c,v 1.12 1998/06/04 17:26:38 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/commands/_deadcode/Attic/version.c,v 1.13 1998/06/15 19:28:17 momjian Exp $
  *
  * NOTES
  *       At the point the version is defined, 2 physical relations are created
@@ -207,9 +207,7 @@ setAttrList(char *bname)
                attrname = (rdesc->rd_att->attrs[i]->attname).data;
 
                if (notfirst == 1)
-               {
                        sprintf(temp_buf, ", %s = new.%s", attrname, attrname);
-               }
                else
                {
                        sprintf(temp_buf, "%s = new.%s", attrname, attrname);
index fcf02b2e4bfea9a3259941d235fe50f2f128ba64..fcdda333057685c8eae5ba05453ac27fbb502796 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/commands/async.c,v 1.32 1998/05/06 23:49:52 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/commands/async.c,v 1.33 1998/06/15 19:28:11 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -312,9 +312,7 @@ Async_NotifyAtCommit()
                                                if (kill(DatumGetInt32(d), SIGUSR2) < 0)
                                                {
                                                        if (errno == ESRCH)
-                                                       {
                                                                heap_delete(lRel, &lTuple->t_ctid);
-                                                       }
                                                }
 #endif
                                        }
@@ -360,9 +358,7 @@ Async_NotifyAtAbort()
        extern TransactionState CurrentTransactionState;
 
        if (notifyIssued)
-       {
                ClearPendingNotify();
-       }
        notifyIssued = 0;
        if (pendingNotifies)
                DLFreeList(pendingNotifies);
@@ -446,9 +442,7 @@ Async_Listen(char *relname, int pid)
                        d = heap_getattr(htup, Anum_pg_listener_pid, tdesc, &isnull);
                        pid = DatumGetInt32(d);
                        if (pid == MyProcPid)
-                       {
                                alreadyListener = 1;
-                       }
                }
                ReleaseBuffer(b);
        }
@@ -517,9 +511,7 @@ Async_Unlisten(char *relname, int pid)
        RelationSetLockForWrite(lDesc);
 
        if (lTuple != NULL)
-       {
                heap_delete(lDesc, &lTuple->t_ctid);
-       }
 
        RelationUnsetLockForWrite(lDesc);
        heap_close(lDesc);
@@ -610,9 +602,7 @@ Async_NotifyFrontEnd()
                        pq_flush();
                }
                else
-               {
                        elog(NOTICE, "Async_NotifyFrontEnd: no asynchronous notification to frontend on interactive sessions");
-               }
                ReleaseBuffer(b);
        }
        CommitTransactionCommand();
index f41b612369c1027969a6741f061cfa6b8f694ed2..13d5e2adc9c7a29256f5a06608fbb0f608e010b7 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.27 1998/04/27 04:05:10 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/commands/Attic/command.c,v 1.28 1998/06/15 19:28:12 momjian Exp $
  *
  * NOTES
  *       The PortalExecutorHeapMemory crap needs to be eliminated
@@ -475,9 +475,7 @@ PerformAddAttribute(char *relationName,
                form = (TypeTupleForm) GETSTRUCT(typeTuple);
 
                if (!HeapTupleIsValid(typeTuple))
-               {
                        elog(ERROR, "Add: type \"%s\" nonexistent", p);
-               }
                namestrcpy(&(attribute->attname), (char *) key[1].sk_argument);
 
                attribute->atttypid = typeTuple->t_oid;
index b2ca946b80bbe1173f126276e6560dcda75449bf..dc6de2bb7767843ef90f5f55608cf04ce2b6585b 100644 (file)
@@ -6,7 +6,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.45 1998/03/30 16:45:55 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/commands/copy.c,v 1.46 1998/06/15 19:28:13 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -284,9 +284,7 @@ CopyTo(Relation rel, bool binary, bool oids, FILE *fp, char *delim)
                                        fputs("\\N", fp);       /* null indicator */
 
                                if (i == attr_count - 1)
-                               {
                                        fputc('\n', fp);
-                               }
                                else
                                {
 
@@ -343,9 +341,7 @@ CopyTo(Relation rel, bool binary, bool oids, FILE *fp, char *delim)
 
        heap_endscan(scandesc);
        if (binary)
-       {
                pfree(nulls);
-       }
        else
        {
                pfree(out_functions);
@@ -494,9 +490,7 @@ CopyFrom(Relation rel, bool binary, bool oids, FILE *fp, char *delim)
                                        }
                                }
                                else
-                               {
                                        indexPred[i] = NULL;
-                               }
                        }
                }
        }
@@ -576,9 +570,7 @@ CopyFrom(Relation rel, bool binary, bool oids, FILE *fp, char *delim)
                                        nulls[i] = 'n';
                                }
                                else if (string == NULL)
-                               {
                                        done = 1;
-                               }
                                else
                                {
                                        values[i] =
@@ -592,25 +584,19 @@ CopyFrom(Relation rel, bool binary, bool oids, FILE *fp, char *delim)
                                         */
                                        if (!PointerIsValid(values[i]) &&
                                                !(rel->rd_att->attrs[i]->attbyval))
-                                       {
                                                elog(ERROR, "copy from line %d: Bad file format", lineno);
-                                       }
                                }
                        }
 #ifdef COPY_PATCH
                        if (!done)
-                       {
                                CopyReadNewline(fp, &newline);
-                       }
 #endif
                }
                else
                {                                               /* binary */
                        fread(&len, sizeof(int32), 1, fp);
                        if (feof(fp))
-                       {
                                done = 1;
-                       }
                        else
                        {
                                if (oids)
@@ -799,9 +785,7 @@ CopyFrom(Relation rel, bool binary, bool oids, FILE *fp, char *delim)
                                        pfree((void *) values[i]);
                        }
                        else if (nulls[i] == 'n')
-                       {
                                nulls[i] = ' ';
-                       }
                }
 
                pfree(tuple);
@@ -959,9 +943,7 @@ GetIndexRelations(Oid main_relation_oid,
        *index_rels = (Relation *) palloc(*n_indices * sizeof(Relation));
 
        for (i = 0, scan = head; i < *n_indices; i++, scan = scan->next)
-       {
                (*index_rels)[i] = index_open(scan->index_rel_oid);
-       }
 
        for (i = 0, scan = head; i < *n_indices + 1; i++)
        {
@@ -1075,9 +1057,7 @@ CopyReadAttribute(FILE *fp, bool *isnull, char *delim)
                                                        val = (val << 3) + VALUE(c);
                                                        c = getc(fp);
                                                        if (ISOCTAL(c))
-                                                       {
                                                                val = (val << 3) + VALUE(c);
-                                                       }
                                                        else
                                                        {
                                                                if (feof(fp))
@@ -1128,9 +1108,7 @@ CopyReadAttribute(FILE *fp, bool *isnull, char *delim)
                {
 #ifdef COPY_PATCH
                        if (c == '\n')
-                       {
                                *newline = 1;
-                       }
 #endif
                        done = 1;
                }
index 8eb14ace7a6d51d221e76b4fc02d5bfd4d5182d2..7c216149dcaf96b1e152866ac78dfd73eecdabaf 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.29 1998/04/26 04:06:20 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/commands/Attic/creatinh.c,v 1.30 1998/06/15 19:28:14 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -256,9 +256,7 @@ MergeAttributes(List *schema, List *supers, List **supconstr)
                                 "MergeAttr: Can't inherit from non-existent superclass '%s'", name);
                }
                if (relation->rd_rel->relkind == 'S')
-               {
                        elog(ERROR, "MergeAttr: Can't inherit from sequence superclass '%s'", name);
-               }
                tupleDesc = RelationGetTupleDescriptor(relation);
                constr = tupleDesc->constr;
 
index 40cdd4d94e13143f01da2ce9575809e093ca6c0d..2d4bdcb39b971f310f6ac0ea3292c62e14b5a401 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.14 1998/06/04 17:26:38 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/commands/dbcommands.c,v 1.15 1998/06/15 19:28:14 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -68,9 +68,7 @@ createdb(char *dbname, char *dbpath)
                sprintf(loc, "%s%c%s", dbpath, SEP_CHAR, dbname);
        }
        else
-       {
                strcpy(loc, dbname);
-       }
 
        lp = ExpandDatabasePath(loc);
 
@@ -114,9 +112,7 @@ destroydb(char *dbname)
        check_permissions("destroydb", dbpath, dbname, &db_id, &user_id);
 
        if (!OidIsValid(db_id))
-       {
                elog(FATAL, "impossible: pg_database instance with invalid OID.");
-       }
 
        /* stop the vacuum daemon */
        stop_vacuum(dbpath, dbname);
@@ -224,15 +220,11 @@ check_permissions(char *command,
 
        /* Make sure we are not mucking with the template database */
        if (!strcmp(dbname, "template1"))
-       {
                elog(ERROR, "%s cannot be executed on the template database.", command);
-       }
 
        /* Check to make sure database is not the currently open database */
        if (!strcmp(dbname, DatabaseName))
-       {
                elog(ERROR, "%s cannot be executed on an open database", command);
-       }
 
        /* Check to make sure database is owned by this user */
 
@@ -272,9 +264,7 @@ check_permissions(char *command,
                *(path + VARSIZE(dbtext) - VARHDRSZ) = '\0';
        }
        else
-       {
                *dbIdP = InvalidOid;
-       }
 
        heap_close(dbrel);
 
@@ -322,9 +312,7 @@ stop_vacuum(char *dbpath, char *dbname)
                                dbname, SEP_CHAR, dbname);
        }
        else
-       {
                sprintf(filename, "%s%c%s.vacuum", dbpath, SEP_CHAR, dbname);
-       }
 
        if ((fp = AllocateFile(filename, "r")) != NULL)
        {
index 666d95706712481d9187cd8e569cc3be0e0daa8e..5afe352b0fbc36a1b8110c68a359eb6bb4b82521 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/commands/Attic/defind.c,v 1.20 1998/01/05 16:38:52 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/commands/Attic/defind.c,v 1.21 1998/06/15 19:28:15 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -94,9 +94,7 @@ DefineIndex(char *heapRelationName,
         */
        numberOfAttributes = length(attributeList);
        if (numberOfAttributes <= 0)
-       {
                elog(ERROR, "DefineIndex: must specify at least one attribute");
-       }
 
        /*
         * compute heap relation id
@@ -369,9 +367,7 @@ CheckPredicate(List *predList, List *rangeTable, Oid baseRelOid)
        List       *item;
 
        foreach(item, predList)
-       {
                CheckPredExpr(lfirst(item), rangeTable, baseRelOid);
-       }
 }
 
 static void
@@ -391,9 +387,7 @@ CheckPredExpr(Node *predicate, List *rangeTable, Oid baseRelOid)
                elog(ERROR, "Unsupported partial-index predicate expression type");
 
        foreach(clause, clauses)
-       {
                CheckPredExpr(lfirst(clause), rangeTable, baseRelOid);
-       }
 }
 
 static void
@@ -408,9 +402,7 @@ CheckPredClause(Expr *predicate, List *rangeTable, Oid baseRelOid)
        if (!IsA(predicate->oper, Oper) ||
                !IsA(pred_var, Var) ||
                !IsA(pred_const, Const))
-       {
                elog(ERROR, "Unsupported partial-index predicate clause type");
-       }
 
        if (getrelid(pred_var->varno, rangeTable) != baseRelOid)
                elog(ERROR,
@@ -538,9 +530,7 @@ GetDefaultOpClass(Oid atttypid)
                                                                ObjectIdGetDatum(atttypid),
                                                                0, 0, 0);
        if (!HeapTupleIsValid(tuple))
-       {
                return 0;
-       }
 
        return nameout(&(((Form_pg_opclass) GETSTRUCT(tuple))->opcname));
 }
@@ -564,9 +554,7 @@ RemoveIndex(char *name)
                                                                0, 0, 0);
 
        if (!HeapTupleIsValid(tuple))
-       {
                elog(ERROR, "index \"%s\" nonexistent", name);
-       }
 
        if (((Form_pg_class) GETSTRUCT(tuple))->relkind != RELKIND_INDEX)
        {
index 15ad37d76ee1ed2d2d56a30d6c6a8ec61966db2a..39340d17260ec11593930ea3a39f6ec62484e79e 100644 (file)
@@ -9,7 +9,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/commands/define.c,v 1.24 1998/02/26 04:30:57 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/commands/define.c,v 1.25 1998/06/15 19:28:15 momjian Exp $
  *
  * DESCRIPTION
  *       The "DefineFoo" routines take the parse tree and pick out the
@@ -130,9 +130,7 @@ compute_full_attributes(const List *parameters, int32 *byte_pct_p,
                ParamString *param = (ParamString *) lfirst(pl);
 
                if (strcasecmp(param->name, "iscachable") == 0)
-               {
                        *canCache_p = true;
-               }
                else if (strcasecmp(param->name, "trusted") == 0)
                {
 
@@ -177,9 +175,7 @@ compute_full_attributes(const List *parameters, int32 *byte_pct_p,
                        }
                }
                else if (strcasecmp(param->name, "outin_ratio") == 0)
-               {
                        *outin_ratio_p = atoi(param->val);
-               }
        }
 }
 
@@ -394,13 +390,9 @@ DefineOperator(char *oprName,
                                elog(ERROR, "setof type not implemented for leftarg");
 
                        if (nodeTag(defel->arg) == T_String)
-                       {
                                typeName1 = defGetString(defel);
-                       }
                        else
-                       {
                                elog(ERROR, "type for leftarg is malformed.");
-                       }
                }
                else if (!strcasecmp(defel->defname, "rightarg"))
                {
@@ -409,18 +401,12 @@ DefineOperator(char *oprName,
                                elog(ERROR, "setof type not implemented for rightarg");
 
                        if (nodeTag(defel->arg) == T_String)
-                       {
                                typeName2 = defGetString(defel);
-                       }
                        else
-                       {
                                elog(ERROR, "type for rightarg is malformed.");
-                       }
                }
                else if (!strcasecmp(defel->defname, "procedure"))
-               {
                        functionName = defGetString(defel);
-               }
                else if (!strcasecmp(defel->defname, "precedence"))
                {
                        /* NOT IMPLEMENTED (never worked in v4.2) */
@@ -432,25 +418,15 @@ DefineOperator(char *oprName,
                        elog(NOTICE, "CREATE OPERATOR: associativity not implemented");
                }
                else if (!strcasecmp(defel->defname, "commutator"))
-               {
                        commutatorName = defGetString(defel);
-               }
                else if (!strcasecmp(defel->defname, "negator"))
-               {
                        negatorName = defGetString(defel);
-               }
                else if (!strcasecmp(defel->defname, "restrict"))
-               {
                        restrictionName = defGetString(defel);
-               }
                else if (!strcasecmp(defel->defname, "join"))
-               {
                        joinName = defGetString(defel);
-               }
                else if (!strcasecmp(defel->defname, "hashes"))
-               {
                        canHash = TRUE;
-               }
                else if (!strcasecmp(defel->defname, "sort1"))
                {
                        /* ----------------
@@ -462,9 +438,7 @@ DefineOperator(char *oprName,
                        sortName1 = defGetString(defel);
                }
                else if (!strcasecmp(defel->defname, "sort2"))
-               {
                        sortName2 = defGetString(defel);
-               }
                else
                {
                        elog(NOTICE, "DefineOperator: attribute \"%s\" not recognized",
@@ -476,9 +450,7 @@ DefineOperator(char *oprName,
         * make sure we have our required definitions
         */
        if (functionName == NULL)
-       {
                elog(ERROR, "Define: \"procedure\" unspecified");
-       }
 
        /* ----------------
         *      now have OperatorCreate do all the work..
@@ -528,13 +500,9 @@ DefineAggregate(char *aggName, List *parameters)
                 * sfunc1
                 */
                if (!strcasecmp(defel->defname, "sfunc1"))
-               {
                        stepfunc1Name = defGetString(defel);
-               }
                else if (!strcasecmp(defel->defname, "basetype"))
-               {
                        baseType = defGetString(defel);
-               }
                else if (!strcasecmp(defel->defname, "stype1"))
                {
                        stepfunc1Type = defGetString(defel);
@@ -544,9 +512,7 @@ DefineAggregate(char *aggName, List *parameters)
                         */
                }
                else if (!strcasecmp(defel->defname, "sfunc2"))
-               {
                        stepfunc2Name = defGetString(defel);
-               }
                else if (!strcasecmp(defel->defname, "stype2"))
                {
                        stepfunc2Type = defGetString(defel);
@@ -564,13 +530,9 @@ DefineAggregate(char *aggName, List *parameters)
                         */
                }
                else if (!strcasecmp(defel->defname, "initcond1"))
-               {
                        init1 = defGetString(defel);
-               }
                else if (!strcasecmp(defel->defname, "initcond2"))
-               {
                        init2 = defGetString(defel);
-               }
                else
                {
                        elog(NOTICE, "DefineAggregate: attribute \"%s\" not recognized",
@@ -647,25 +609,15 @@ DefineType(char *typeName, List *parameters)
                DefElem    *defel = (DefElem *) lfirst(pl);
 
                if (!strcasecmp(defel->defname, "internallength"))
-               {
                        internalLength = defGetTypeLength(defel);
-               }
                else if (!strcasecmp(defel->defname, "externallength"))
-               {
                        externalLength = defGetTypeLength(defel);
-               }
                else if (!strcasecmp(defel->defname, "input"))
-               {
                        inputName = defGetString(defel);
-               }
                else if (!strcasecmp(defel->defname, "output"))
-               {
                        outputName = defGetString(defel);
-               }
                else if (!strcasecmp(defel->defname, "send"))
-               {
                        sendName = defGetString(defel);
-               }
                else if (!strcasecmp(defel->defname, "delimiter"))
                {
                        char       *p = defGetString(defel);
@@ -673,33 +625,21 @@ DefineType(char *typeName, List *parameters)
                        delimiter = p[0];
                }
                else if (!strcasecmp(defel->defname, "receive"))
-               {
                        receiveName = defGetString(defel);
-               }
                else if (!strcasecmp(defel->defname, "element"))
-               {
                        elemName = defGetString(defel);
-               }
                else if (!strcasecmp(defel->defname, "default"))
-               {
                        defaultValue = defGetString(defel);
-               }
                else if (!strcasecmp(defel->defname, "passedbyvalue"))
-               {
                        byValue = true;
-               }
                else if (!strcasecmp(defel->defname, "alignment"))
                {
                        char       *a = defGetString(defel);
 
                        if (!strcasecmp(a, "double"))
-                       {
                                alignment = 'd';
-                       }
                        else if (!strcasecmp(a, "int"))
-                       {
                                alignment = 'i';
-                       }
                        else
                        {
                                elog(ERROR, "DefineType: \"%s\" alignment  not recognized",
index 2a218b68637077abd4ceabf975e2778941f024af..6fef272c08b68f18b28076868605e03f0a76fc3e 100644 (file)
@@ -80,9 +80,7 @@ CreateProceduralLanguage(CreatePLangStmt *stmt)
                                                                  PointerGetDatum(languageName),
                                                                  0, 0, 0);
        if (HeapTupleIsValid(langTup))
-       {
                elog(ERROR, "Language %s already exists", languageName);
-       }
 
        /* ----------------
         * Lookup the PL handler function and check that it is
@@ -171,9 +169,7 @@ DropProceduralLanguage(DropPLangStmt *stmt)
                                                                  PointerGetDatum(languageName),
                                                                  0, 0, 0);
        if (!HeapTupleIsValid(langTup))
-       {
                elog(ERROR, "Language %s doesn't exist", languageName);
-       }
 
        if (!((Form_pg_language) GETSTRUCT(langTup))->lanispl)
        {
@@ -195,9 +191,7 @@ DropProceduralLanguage(DropPLangStmt *stmt)
        tup = heap_getnext(scanDesc, 0, (Buffer *) NULL);
 
        if (!HeapTupleIsValid(tup))
-       {
                elog(ERROR, "Language with name '%s' not found", languageName);
-       }
 
        heap_delete(rdesc, &(tup->t_ctid));
 
index 8034a515311d6b1fda7fc21f72b970aeae32702c..5d96623ed4c5b532b588fbcbcf1aad45398ebf31 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/commands/Attic/recipe.c,v 1.20 1998/02/26 04:30:59 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/commands/Attic/recipe.c,v 1.21 1998/06/15 19:28:15 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -387,9 +387,7 @@ tg_rewriteQuery(TgRecipe * r,
                {
                        tle = lfirst(tl);
                        if (tle->resdom != NULL)
-                       {
                                tle->expr = tg_rewriteParamsInExpr(tle->expr, inputQlist);
-                       }
                }
        }
 
@@ -401,9 +399,7 @@ tg_rewriteQuery(TgRecipe * r,
        if (orig->qual)
        {
                if (nodeTag(orig->qual) == T_List)
-               {
                        elog(ERROR, "tg_rewriteQuery: Whoa! why is my qual a List???");
-               }
                orig->qual = tg_rewriteParamsInExpr(orig->qual, inputQlist);
        }
 
@@ -514,9 +510,7 @@ tg_replaceNumberedParam(Node *expression,
                                        }
                                }
                                else
-                               {
                                        elog(NOTICE, "tg_replaceNumberedParam: unexpected paramkind value of %d", p->paramkind);
-                               }
                        }
                        break;
                case T_Expr:
@@ -626,15 +620,11 @@ tg_rewriteParamsInExpr(Node *expression, QueryTreeList *inputQlist)
                                                        {
                                                                tle = lfirst(tl);
                                                                if (strcmp(resname, tle->resdom->resname) == 0)
-                                                               {
                                                                        return tle->expr;
-                                                               }
                                                        }
                                                }
                                                else
-                                               {
                                                        elog(ERROR, "tg_rewriteParamsInExpr:can't substitute for parameter %d when that input is unconnected", p->paramid);
-                                               }
 
                                        }
                                        else
@@ -648,9 +638,7 @@ tg_rewriteParamsInExpr(Node *expression, QueryTreeList *inputQlist)
                                        }
                                }
                                else
-                               {
                                        elog(NOTICE, "tg_rewriteParamsInExpr: unexpected paramkind value of %d", p->paramkind);
-                               }
                        }
                        break;
                case T_Expr:
@@ -716,9 +704,7 @@ getParamTypes(TgElement * elem, Oid typev[])
 
        parameterCount = 0;
        for (i = 0; i < 8; i++)
-       {
                typev[i] = 0;
-       }
        for (j = 0; j < elem->inTypes->num; j++)
        {
                if (parameterCount == 8)
@@ -736,13 +722,9 @@ getParamTypes(TgElement * elem, Oid typev[])
                {
                        toid = TypeGet(elem->inTypes->val[j], &defined);
                        if (!OidIsValid(toid))
-                       {
                                elog(ERROR, "getParamTypes: arg type '%s' is not defined", t);
-                       }
                        if (!defined)
-                       {
                                elog(NOTICE, "getParamTypes: arg type '%s' is only a shell", t);
-                       }
                }
                typev[parameterCount++] = toid;
        }
@@ -904,9 +886,7 @@ tg_parseSubQuery(TgRecipe * r, TgNode * n, TeeInfo * teeInfo)
 
                                                sprintf(newquery, "select %s($1", funcName);
                                                for (i = 1; i < parameterCount; i++)
-                                               {
                                                        sprintf(newquery, "%s,$%d", newquery, i);
-                                               }
                                                sprintf(newquery, "%s)", newquery);
                                        }
                                        else
@@ -1071,9 +1051,7 @@ tg_parseSubQuery(TgRecipe * r, TgNode * n, TeeInfo * teeInfo)
                                                                                "result",
                                                                                InvalidOid,
                                                                                -1, 0, false))
-                               {
                                        elog(NOTICE, "tg_parseSubQuery: unexpected result from TupleDescInitEntry");
-                               }
                                else
                                {
                                        relid = heap_create_with_catalog(
@@ -1083,9 +1061,7 @@ tg_parseSubQuery(TgRecipe * r, TgNode * n, TeeInfo * teeInfo)
                }
        }
        else if (n->nodeType == TG_RECIPE_NODE)
-       {
                elog(NOTICE, "tg_parseSubQuery: can't handle embedded recipes yet!");
-       }
        else
                elog(NOTICE, "unknown nodeType: %d", n->nodeType);
 
@@ -1134,9 +1110,7 @@ OffsetVarAttno(Node *node, int varno, int offset)
                                List       *l;
 
                                foreach(l, (List *) node)
-                               {
                                        OffsetVarAttno(lfirst(l), varno, offset);
-                               }
                        }
                        break;
                default:
@@ -1174,9 +1148,7 @@ appendQlist(QueryTreeList *q1, QueryTreeList *q2)
        for (i = 0; i < q1->len; i++)
                newq->qtrees[i] = q1->qtrees[i];
        for (j = 0; j < q2->len; j++)
-       {
                newq->qtrees[i + j] = q2->qtrees[j];
-       }
        return newq;
 }
 
@@ -1225,9 +1197,7 @@ replaceSeqScan(Plan *plan, Plan *parent,
        Result     *newPlan;
 
        if (plan == NULL)
-       {
                return;
-       }
 
        if (plan->type == T_SeqScan)
        {
@@ -1288,13 +1258,9 @@ replaceSeqScan(Plan *plan, Plan *parent,
        else
        {
                if (plan->lefttree)
-               {
                        replaceSeqScan(plan->lefttree, plan, rt_ind, tplan);
-               }
                if (plan->righttree)
-               {
                        replaceSeqScan(plan->righttree, plan, rt_ind, tplan);
-               }
        }
 }
 
@@ -1352,14 +1318,10 @@ replaceTeeScans(Plan *plan, Query *parsetree, TeeInfo * teeInfo)
                        {
                                if (strcmp(teeInfo->val[i].tpi_relName,
                                                   rte->refname) == 0)
-                               {
                                        tplan = teeInfo->val[i].tpi_plan;
-                               }
                        }
                        if (tplan == NULL)
-                       {
                                elog(NOTICE, "replaceTeeScans didn't find the corresponding tee plan");
-                       }
 
                        /*
                         * replace the sequential scan node with that var number with
index 1eeccd9ac48fd0f89357726fcfb034044fbcaa79..0a030e6570c90504a43f27ff7c9581c1e52987c7 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/commands/Attic/remove.c,v 1.24 1998/05/09 23:43:45 thomas Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/commands/Attic/remove.c,v 1.25 1998/06/15 19:28:16 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -364,9 +364,7 @@ RemoveFunction(char *functionName,          /* function name to be removed */
                                                                          0, 0, 0);
 
                        if (!HeapTupleIsValid(tup))
-                       {
                                elog(ERROR, "RemoveFunction: type '%s' not found", typename);
-                       }
                        argList[i] = tup->t_oid;
                }
        }
@@ -458,14 +456,10 @@ RemoveAggregate(char *aggName, char *aggType)
        {
                basetypeID = TypeGet(aggType, &defined);
                if (!OidIsValid(basetypeID))
-               {
                        elog(ERROR, "RemoveAggregate: type '%s' does not exist", aggType);
-               }
        }
        else
-       {
                basetypeID = 0;
-       }
 
 /*
 #ifndef NO_SECURITY
index b19879b94728bc7cafe994a5333d97a4e0ce4c2b..572cc3b3f60fa6c0f13c2283abb2b7ca32b0809a 100644 (file)
@@ -313,9 +313,7 @@ currval(struct varlena * seqin)
        pfree(seqname);
 
        if (elm->increment == 0)        /* nextval/read_info were not called */
-       {
                elog(ERROR, "%s.currval is not yet defined in this session", elm->name);
-       }
 
        result = elm->last;
 
index 45e3225de66915b41d9d343a107fe82f88dbf264..30a7f605910ddcc46b4b57ae4c70b473a73bbfe7 100644 (file)
@@ -149,14 +149,10 @@ CreateTrigger(CreateTrigStmt *stmt)
                        ObjectIdGetDatum(((Form_pg_proc) GETSTRUCT(tuple))->prolang),
                                                                          0, 0, 0);
                if (!HeapTupleIsValid(langTup))
-               {
                        elog(ERROR, "CreateTrigger: cache lookup for PL failed");
-               }
 
                if (((Form_pg_language) GETSTRUCT(langTup))->lanispl == false)
-               {
                        elog(ERROR, "CreateTrigger: only C and PL functions are supported");
-               }
        }
 
        MemSet(nulls, ' ', Natts_pg_trigger * sizeof(char));
@@ -598,9 +594,7 @@ ExecCallTriggerFunc(Trigger *trigger)
 {
 
        if (trigger->tgfunc.fn_addr == NULL)
-       {
                fmgr_info(trigger->tgfoid, &trigger->tgfunc);
-       }
 
        if (trigger->tgfunc.fn_plhandler != NULL)
        {
index 180523f8bf2d9dc2abc7c493aab9c8aa549780df..c206808390ae69cd27ff0cfd60efa899f863b4b7 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.64 1998/04/27 04:05:31 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/commands/vacuum.c,v 1.65 1998/06/15 19:28:16 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -333,9 +333,7 @@ vc_getrels(NameData *VacRelP)
                /* get a relation list entry for this guy */
                old = MemoryContextSwitchTo((MemoryContext) portalmem);
                if (vrl == (VRelList) NULL)
-               {
                        vrl = cur = (VRelList) palloc(sizeof(VRelListData));
-               }
                else
                {
                        cur->vrl_next = (VRelList) palloc(sizeof(VRelListData));
@@ -1029,9 +1027,7 @@ vc_rpfheap(VRelStats *vacrelstats, Relation onerel,
                                dowrite = true;
                        }
                        else
-                       {
                                Assert(isempty);
-                       }
                        --Vnpages;
                        Assert(Vnpages > 0);
                        /* get prev reapped page from Vvpl */
@@ -1054,9 +1050,7 @@ vc_rpfheap(VRelStats *vacrelstats, Relation onerel,
                        }
                }
                else
-               {
                        Assert(!isempty);
-               }
 
                vpc->vpd_blkno = blkno;
                maxoff = PageGetMaxOffsetNumber(page);
@@ -1529,9 +1523,7 @@ vc_vaconeind(VPageList vpl, Relation indrel, int nhtups)
                        index_delete(indrel, &res->index_iptr);
                }
                else
-               {
                        nitups++;
-               }
 
                /* be tidy */
                pfree(res);
@@ -2219,9 +2211,7 @@ vc_clsindices(int nindices, Relation *Irel)
                return;
 
        while (nindices--)
-       {
                index_close(Irel[nindices]);
-       }
        pfree(Irel);
 
 }      /* vc_clsindices */
index 621854f200f8c0d16f64d7db1eaa72fd6bbe23d9..9e138b82a91eaac0f496f56c45a55a08eca9b746 100644 (file)
@@ -2,7 +2,7 @@
  * Routines for handling of 'SET var TO',
  *     'SHOW var' and 'RESET var' statements.
  *
- * $Id: variable.c,v 1.5 1998/03/30 16:45:59 momjian Exp $
+ * $Id: variable.c,v 1.6 1998/06/15 19:28:17 momjian Exp $
  *
  */
 
@@ -365,9 +365,7 @@ parse_date(const char *value)
                        ecnt++;
                }
                else
-               {
                        elog(ERROR, "Bad value for date style (%s)", tok);
-               }
                pfree(tok);
        }
 
index 5602cc992d7425ef270fb701eaf87d91a0a4330d..6360f004b75dff47cda5c546e47acb0158826249 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/commands/view.c,v 1.21 1998/02/26 04:31:06 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/commands/view.c,v 1.22 1998/06/15 19:28:17 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -90,9 +90,7 @@ DefineVirtualRelation(char *relname, List *tlist)
                }
        }
        else
-       {
                elog(ERROR, "attempted to define virtual relation with no attrs");
-       }
 
        /*
         * now create the parametesr for keys/inheritance etc. All of them are
index 0497c922ef1c2d918c5e3fcaaff4755db2e15918..8ce988114adc880f627619b1141d89d78bf20441 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/executor/execAmi.c,v 1.20 1998/02/27 16:11:26 vadim Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/executor/execAmi.c,v 1.21 1998/06/15 19:28:18 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -124,9 +124,7 @@ ExecOpenR(Oid relationOid, bool isindex)
         * ----------------
         */
        if (isindex)
-       {
                relation = index_open(relationOid);
-       }
        else
                relation = heap_open(relationOid);
 
index 75aa8de70976d110ed06d58909a06dfb679a204d..51bd68bf9155509127f0b337df6d18e92103633f 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/executor/execJunk.c,v 1.10 1998/01/31 04:38:24 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/executor/execJunk.c,v 1.11 1998/06/15 19:28:18 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -230,9 +230,7 @@ ExecInitJunkFilter(List *targetList)
                }
        }
        else
-       {
                cleanMap = NULL;
-       }
 
        /* ---------------------
         * Finally create and initialize the JunkFilter.
index 4e14107f5fd44c9be0b12d9315500ed1007a4911..66460913cf3297a6f414f0f9773f4b6b54fac4c9 100644 (file)
@@ -26,7 +26,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.47 1998/05/26 03:44:07 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/executor/execMain.c,v 1.48 1998/06/15 19:28:19 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -364,9 +364,7 @@ ExecCheckPerms(CmdType operation,
                ++i;
        }
        if (!ok)
-       {
                elog(ERROR, "%s: %s", rname.data, aclcheck_error_strings[aclcheck_result]);
-       }
 }
 
 /* ===============================================================
@@ -660,9 +658,7 @@ EndPlan(Plan *plan, EState *estate)
         * ----------------
         */
        if (intoRelationDesc != NULL)
-       {
                heap_close(intoRelationDesc);
-       }
 }
 
 /* ----------------------------------------------------------------
@@ -1009,9 +1005,7 @@ ExecAppend(TupleTableSlot *slot,
         */
        numIndices = resultRelationInfo->ri_NumIndices;
        if (numIndices > 0)
-       {
                ExecInsertIndexTuples(slot, &(tuple->t_ctid), estate, false);
-       }
        (estate->es_processed)++;
        estate->es_lastoid = newId;
 
@@ -1218,9 +1212,7 @@ ExecReplace(TupleTableSlot *slot,
 
        numIndices = resultRelationInfo->ri_NumIndices;
        if (numIndices > 0)
-       {
                ExecInsertIndexTuples(slot, &(tuple->t_ctid), estate, true);
-       }
 
        /* AFTER ROW UPDATE Triggers */
        if (resultRelationDesc->trigdesc &&
index 16309ff6336e371912c8afafc90066ae88118162..8f167b8546cd2e4fe0d3b19c32d91f9f115947ff 100644 (file)
@@ -11,7 +11,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/executor/execProcnode.c,v 1.10 1998/05/19 18:05:45 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/executor/execProcnode.c,v 1.11 1998/06/15 19:28:19 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -426,13 +426,9 @@ ExecEndNode(Plan *node, Plan *parent)
                return;
 
        foreach(subp, node->initPlan)
-       {
                ExecEndSubPlan((SubPlan *) lfirst(subp));
-       }
        foreach(subp, node->subPlan)
-       {
                ExecEndSubPlan((SubPlan *) lfirst(subp));
-       }
        if (node->chgParam != NULL)
        {
                freeList(node->chgParam);
index 34193990db09120f7d12d4451bcc139021fb5b76..31e2791eabebfbe7bc7e333921c6e0f51a1d019b 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/executor/execQual.c,v 1.32 1998/05/29 17:00:06 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/executor/execQual.c,v 1.33 1998/06/15 19:28:19 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -417,16 +417,12 @@ ExecEvalParam(Param *expression, ExprContext *econtext, bool *isNull)
                                case PARAM_NAMED:
                                        if (thisParameterKind == paramList->kind &&
                                                strcmp(paramList->name, thisParameterName) == 0)
-                                       {
                                                matchFound = 1;
-                                       }
                                        break;
                                case PARAM_NUM:
                                        if (thisParameterKind == paramList->kind &&
                                                paramList->id == thisParameterId)
-                                       {
                                                matchFound = 1;
-                                       }
                                        break;
                                case PARAM_OLD:
                                case PARAM_NEW:
@@ -454,9 +450,7 @@ ExecEvalParam(Param *expression, ExprContext *econtext, bool *isNull)
                                                 thisParameterKind);
                        }
                        if (!matchFound)
-                       {
                                paramList++;
-                       }
                }                                               /* while */
        }                                                       /* if */
 
@@ -821,9 +815,7 @@ ExecMakeFunctionResult(Node *node,
                         * its func cache.
                         */
                        if (*isDone)
-                       {
                                ((Func *) node)->func_fcache = NULL;
-                       }
                }
                return result;
        }
@@ -1558,9 +1550,7 @@ ExecTargetList(List *targetlist,
 #endif
                                resind = fjRes->resno - 1;
                                if (fjIsNull[curNode])
-                               {
                                        null_head[resind] = 'n';
-                               }
                                else
                                {
                                        null_head[resind] = ' ';
index 96f8f21128a6983709ee31acff83839a98940030..1db49d391c7b6ef3a17ad7e61453ce013b9ca311 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/executor/execUtils.c,v 1.31 1998/04/27 04:05:41 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/executor/execUtils.c,v 1.32 1998/06/15 19:28:20 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -804,9 +804,7 @@ ExecOpenIndices(Oid resultRelationOid,
                        pfree(predString);
                }
                else
-               {
                        predicate = NULL;
-               }
 
                /* ----------------
                 *      save the index information into lists
@@ -916,9 +914,7 @@ ExecOpenIndices(Oid resultRelationOid,
 
                i = 0;
                foreach(indexpreds, predList)
-               {
                        indexInfoArray[i++]->ii_Predicate = lfirst(indexpreds);
-               }
                /* ----------------
                 *       store the index info array into relation info
                 * ----------------
@@ -1117,9 +1113,7 @@ ExecInsertIndexTuples(TupleTableSlot *slot,
                if (predicate != NULL)
                {
                        if (econtext == NULL)
-                       {
                                econtext = makeNode(ExprContext);
-                       }
                        econtext->ecxt_scantuple = slot;
 
                        /* Skip this index-update if the predicate isn't satisfied */
index f6e034d9881bff7440aeb28f657db51c8adfb9a2..fe14f3df72817d364c1a9e5fd44b69072f5d4ad8 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/executor/functions.c,v 1.16 1998/02/13 03:26:44 vadim Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/executor/functions.c,v 1.17 1998/06/15 19:28:20 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -176,9 +176,7 @@ postquel_start(execution_state *es)
         * 30-8-1996
         */
        if (es->qd->operation == CMD_UTILITY)
-       {
                return (TupleDesc) NULL;
-       }
 #endif
        return ExecutorStart(es->qd, es->estate);
 }
@@ -218,9 +216,7 @@ postquel_end(execution_state *es)
         * 30-8-1996
         */
        if (es->qd->operation == CMD_UTILITY)
-       {
                return;
-       }
 #endif
        ExecutorEnd(es->qd, es->estate);
 }
index 84f3d1412f01920c270fc4b014c7ff754aed48c0..58c837e8e9c85f9937e3864dac40ea0451076b0b 100644 (file)
@@ -405,9 +405,7 @@ ExecAgg(Agg *node)
                 * the tuples we aggregate over share the same group column)
                 */
                if (!oneTuple)
-               {
                        oneTuple = heap_copytuple(outerslot->val);
-               }
 
                nTuplesAgged++;
        }
@@ -437,13 +435,9 @@ ExecAgg(Agg *node)
                                args[1] = (char *) value2[i];
                        }
                        else if (aggfns->xfn1.fn_addr != NULL)
-                       {
                                args[0] = (char *) value1[i];
-                       }
                        else if (aggfns->xfn2.fn_addr != NULL)
-                       {
                                args[0] = (char *) value2[i];
-                       }
                        else
                                elog(NOTICE, "ExecAgg: no valid transition functions??");
                        value1[i] = (Datum) fmgr_c(&aggfns->finalfn,
@@ -458,9 +452,7 @@ ExecAgg(Agg *node)
                         */
                }
                else if (aggfns->xfn2.fn_addr != NULL)
-               {
                        value1[i] = value2[i];
-               }
                else
                        elog(ERROR, "ExecAgg: no valid transition functions??");
        }
@@ -475,9 +467,7 @@ ExecAgg(Agg *node)
                aggstate->agg_done = ((Group *) outerPlan)->grpstate->grp_done;
        }
        else
-       {
                aggstate->agg_done = TRUE;
-       }
 
        /* ----------------
         *      form a projection tuple, store it in the result tuple
index 86286284e91d7473a5161d89499a01fba32a0dd4..49c7f6ba4575e154aa2c2af0dfceea01871359a3 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/executor/nodeAppend.c,v 1.11 1998/02/26 04:31:21 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/executor/nodeAppend.c,v 1.12 1998/06/15 19:28:21 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -351,9 +351,7 @@ ExecCountSlotsAppend(Append *node)
        int                     nSlots = 0;
 
        foreach(plan, unionplans)
-       {
                nSlots += ExecCountSlotsNode((Plan *) lfirst(plan));
-       }
        return nSlots + APPEND_NSLOTS;
 }
 
@@ -426,13 +424,9 @@ ExecProcAppend(Append *node)
                whichplan = unionstate->as_whichplan;
 
                if (ScanDirectionIsForward(direction))
-               {
                        unionstate->as_whichplan = whichplan + 1;
-               }
                else
-               {
                        unionstate->as_whichplan = whichplan - 1;
-               }
 
                /* ----------------
                 *      return something from next node or an empty slot
@@ -484,9 +478,7 @@ ExecEndAppend(Append *node)
        for (i = 0; i < nplans; i++)
        {
                if (initialized[i] == TRUE)
-               {
                        ExecEndNode((Plan *) nth(i, unionplans), (Plan *) node);
-               }
        }
 
        /* ----------------
index 81e4b540ec0e0770b3d978fdcf475160b002083e..4ba1aeaa76b3255725989de0f8ca1e23cceb99f3 100644 (file)
@@ -13,7 +13,7 @@
  *       columns. (ie. tuples from the same group are consecutive)
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/executor/nodeGroup.c,v 1.18 1998/02/26 04:31:24 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/executor/nodeGroup.c,v 1.19 1998/06/15 19:28:21 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -114,9 +114,7 @@ ExecGroupEveryTuple(Group *node)
                firsttuple = grpstate->grp_firstTuple;
                /* this should occur on the first call only */
                if (firsttuple == NULL)
-               {
                        grpstate->grp_firstTuple = heap_copytuple(outerTuple);
-               }
                else
                {
 
index 81eca617fb4f427464118fc9539c154533959ece..eb99a1d08e85348c2f71ea04eacbdcb3404d7cd4 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/executor/nodeHash.c,v 1.20 1998/02/26 04:31:25 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/executor/nodeHash.c,v 1.21 1998/06/15 19:28:21 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -354,9 +354,7 @@ ExecHashTableCreate(Hash *node)
        shmid = 0;
 
        if (hashtable == NULL)
-       {
                elog(ERROR, "not enough memory for hashjoin.");
-       }
        /* ----------------
         *      initialize the hash table header
         * ----------------
index 74a36e45efa04e76052dff909fb4047eb87c19eb..3354224a6951a097903f62897932455eabf4bffe 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/executor/nodeIndexscan.c,v 1.17 1998/03/30 16:46:08 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/executor/nodeIndexscan.c,v 1.18 1998/06/15 19:28:22 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -279,13 +279,9 @@ ExecIndexReScan(IndexScan *node, ExprContext *exprCtxt, Plan *parent)
                                        ExecEvalExpr(scanexpr, exprCtxt, &isNull, &isDone);
                                scan_keys[j].sk_argument = scanvalue;
                                if (isNull)
-                               {
                                        scan_keys[j].sk_flags |= SK_ISNULL;
-                               }
                                else
-                               {
                                        scan_keys[j].sk_flags &= ~SK_ISNULL;
-                               }
                        }
                }
        }
@@ -885,9 +881,7 @@ ExecInitIndexScan(IndexScan *node, EState *estate, Plan *parent)
         * ----------------
         */
        if (have_runtime_keys)
-       {
                indexstate->iss_RuntimeKeyInfo = (Pointer) runtimeKeyInfo;
-       }
        else
        {
                indexstate->iss_RuntimeKeyInfo = NULL;
index 0525f93296db7f9b020ff57be666245f85b30fee..d3a1bdb62ea6c60e13e32fb2aa5a0ee855586c52 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/executor/nodeMergejoin.c,v 1.15 1998/06/15 18:39:24 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/executor/nodeMergejoin.c,v 1.16 1998/06/15 19:28:22 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -571,13 +571,9 @@ ExecMergeJoin(MergeJoin *node)
                                MJ_DEBUG_QUAL(mergeclauses, qualResult);
 
                                if (qualResult)
-                               {
                                        mergestate->mj_JoinState = EXEC_MJ_JOINTUPLES;
-                               }
                                else
-                               {
                                        mergestate->mj_JoinState = EXEC_MJ_NEXTOUTER;
-                               }
                                break;
 
                                /*
@@ -634,13 +630,9 @@ ExecMergeJoin(MergeJoin *node)
                                econtext->ecxt_innertuple = innerTupleSlot;
 
                                if (TupIsNull(innerTupleSlot))
-                               {
                                        mergestate->mj_JoinState = EXEC_MJ_NEXTOUTER;
-                               }
                                else
-                               {
                                        mergestate->mj_JoinState = EXEC_MJ_JOINTEST;
-                               }
                                break;
 
                                /*
@@ -863,13 +855,9 @@ ExecMergeJoin(MergeJoin *node)
                                MJ_DEBUG_MERGE_COMPARE(innerSkipQual, compareResult);
 
                                if (compareResult)
-                               {
                                        mergestate->mj_JoinState = EXEC_MJ_SKIPINNER;
-                               }
                                else
-                               {
                                        mergestate->mj_JoinState = EXEC_MJ_JOINMARK;
-                               }
                                break;
 
                                /*
@@ -986,13 +974,9 @@ ExecMergeJoin(MergeJoin *node)
                                MJ_DEBUG_MERGE_COMPARE(outerSkipQual, compareResult);
 
                                if (compareResult)
-                               {
                                        mergestate->mj_JoinState = EXEC_MJ_SKIPOUTER;
-                               }
                                else
-                               {
                                        mergestate->mj_JoinState = EXEC_MJ_JOINMARK;
-                               }
 
                                break;
 
index 0d5b210945f6a0e3a2a0624b90415f2653c144e8..39b89c7a79bcccfec4f0f761ddea188dc0132ae3 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/executor/nodeNestloop.c,v 1.9 1998/02/26 04:31:31 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/executor/nodeNestloop.c,v 1.10 1998/06/15 19:28:22 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -120,9 +120,7 @@ ExecNestLoop(NestLoop *node, Plan *parent)
                needNewOuterTuple = false;
 
                if (!TupIsNull(outerTupleSlot))
-               {
                        ENL1_printf("have outer tuple, deal with it");
-               }
                else
                {
                        ENL1_printf("outer tuple is nil, need new outer tuple");
@@ -196,9 +194,7 @@ ExecNestLoop(NestLoop *node, Plan *parent)
                        econtext->ecxt_innertuple = innerTupleSlot;
 
                        if (TupIsNull(innerTupleSlot))
-                       {
                                ENL1_printf("couldn't get inner tuple - need new outer tuple");
-                       }
                        else
                        {
                                ENL1_printf("got inner and outer tuples");
index a351ea4a298c8fb2a2ac49da09a5887b38003c38..795c17e8b09aba71bb48a35e1cc3d58c63b0bfac 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/executor/nodeSeqscan.c,v 1.9 1998/03/30 16:46:15 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/executor/nodeSeqscan.c,v 1.10 1998/06/15 19:28:22 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -129,13 +129,9 @@ ExecSeqScan(SeqScan *node)
         * ----------------
         */
        if ((outerPlan = outerPlan((Plan *) node)) != NULL)
-       {
                slot = ExecProcNode(outerPlan, (Plan *) node);
-       }
        else
-       {
                slot = ExecScan(node, SeqNext);
-       }
 
        S1_printf("ExecSeqScan: returned tuple slot: %d\n", slot);
 
index 665555fa4569357feadfe92b25627472b0c3b8a3..7c27a2608281dcbaa3dc10637a8ea625c93ea1c5 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/executor/nodeSort.c,v 1.14 1998/02/26 04:31:32 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/executor/nodeSort.c,v 1.15 1998/06/15 19:28:23 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -181,9 +181,7 @@ ExecSort(Sort *node)
                SO1_printf(stderr, "ExecSort: sorting done.\n");
        }
        else
-       {
                slot = (TupleTableSlot *) sortstate->csstate.cstate.cs_ResultTupleSlot;
-       }
 
        SO1_printf("ExecSort: %s\n",
                           "retrieving tuple from sorted relation");
index 4a96dc2621e68062d08a8ad32af731109587b447..f372a1ebea5634bf6d6c3840317a2b597d09fa0c 100644 (file)
@@ -15,7 +15,7 @@
  *             ExecEndTee
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/executor/Attic/nodeTee.c,v 1.17 1998/04/24 14:41:55 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/executor/Attic/nodeTee.c,v 1.18 1998/06/15 19:28:23 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -315,18 +315,14 @@ ExecTee(Tee *node, Plan *parent)
        /* XXX doesn't handle backwards direction yet */
 
        if (parent == node->leftParent)
-       {
                branch = leftPlace;
-       }
        else if ((parent == node->rightParent) || (parent == (Plan *) node))
 
                /*
                 * the tee node could be the root node of the plan, in which case,
                 * we treat it like a right-parent pull
                 */
-       {
                branch = rightPlace;
-       }
        else
        {
                elog(ERROR, "A Tee node can only be executed from its left or right parent\n");
@@ -419,13 +415,9 @@ ExecTee(Tee *node, Plan *parent)
        }
 
        if (parent == node->leftParent)
-       {
                teeState->tee_leftPlace = leftPlace + 1;
-       }
        else
-       {
                teeState->tee_rightPlace = rightPlace + 1;
-       }
 
        return result;
 }
index 2464d4ddeff33446cbe06c2273afc99575342ada..40eb3ff8b9388f595956fac9751d6084bdab17f6 100644 (file)
@@ -9,7 +9,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/lib/dllist.c,v 1.9 1998/02/26 04:31:37 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/lib/dllist.c,v 1.10 1998/06/15 19:28:23 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -173,9 +173,7 @@ DLRemHead(Dllist *l)
 
        result = l->dll_head;
        if (l->dll_head->dle_next)
-       {
                l->dll_head->dle_next->dle_prev = 0;
-       }
 
        l->dll_head = l->dll_head->dle_next;
 
@@ -199,9 +197,7 @@ DLRemTail(Dllist *l)
 
        result = l->dll_tail;
        if (l->dll_tail->dle_prev)
-       {
                l->dll_tail->dle_prev->dle_next = 0;
-       }
        l->dll_tail = l->dll_tail->dle_prev;
 
        result->dle_prev = 0;
index 92a21c9bba2fba1129e5ee6da5b0298c51d24f45..ae81edf251d18328b763b06ea77d56471629ea15 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/lib/Attic/fstack.c,v 1.7 1998/04/06 17:27:11 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/lib/Attic/fstack.c,v 1.8 1998/06/15 19:28:24 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -62,9 +62,7 @@ FixedStackPop(FixedStack stack)
        AssertArg(FixedStackIsValid(stack));
 
        if (!PointerIsValid(stack->top))
-       {
                return (NULL);
-       }
 
        pointer = FixedStackGetItemBase(stack, stack->top);
        stack->top = stack->top->next;
@@ -110,9 +108,7 @@ FixedStackContains(FixedStack stack, Pointer pointer)
        for (next = stack->top; FixedItemIsValid(next); next = next->next)
        {
                if (next == item)
-               {
                        return (true);
-               }
        }
        return (false);
 }
@@ -125,9 +121,7 @@ FixedStackGetTop(FixedStack stack)
        AssertArg(FixedStackIsValid(stack));
 
        if (!PointerIsValid(stack->top))
-       {
                return (NULL);
-       }
 
        return (FixedStackGetItemBase(stack, stack->top));
 }
@@ -144,9 +138,7 @@ FixedStackGetNext(FixedStack stack, Pointer pointer)
        item = FixedStackGetItem(stack, pointer)->next;
 
        if (!PointerIsValid(item))
-       {
                return (NULL);
-       }
 
        return (FixedStackGetItemBase(stack, item));
 }
index ccd0311550629836b4c57e8fe6be0a93c19b984c..af85d2cf7e308a1146e54e4a1895b885f90a6029 100644 (file)
@@ -9,7 +9,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/lib/stringinfo.c,v 1.9 1998/01/07 21:03:04 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/lib/stringinfo.c,v 1.10 1998/06/15 19:28:24 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -35,9 +35,7 @@ makeStringInfo()
 
        res = (StringInfo) palloc(sizeof(StringInfoData));
        if (res == NULL)
-       {
                elog(ERROR, "makeStringInfo: Out of memory!");
-       }
 
        size = 100;
        res->data = palloc(size);
@@ -95,9 +93,7 @@ appendStringInfo(StringInfo str, char *buffer)
                 */
                newlen = 2 * str->len;
                while (buflen + str->len >= newlen - 1)
-               {
                        newlen = 2 * newlen;
-               }
 
                /*
                 * allocate enough space.
index c60e060cd21a84aa14993de4e79da728ec62056b..8ecf45fe1225d36430ab2087fde7744e3143d151 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/libpq/be-fsstubs.c,v 1.20 1998/05/12 21:43:58 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/libpq/be-fsstubs.c,v 1.21 1998/06/15 19:28:25 momjian Exp $
  *
  * NOTES
  *       This should be moved to a more appropriate place.  It is here
@@ -69,9 +69,7 @@ lo_open(Oid lobjId, int mode)
 #endif
 
        if (fscxt == NULL)
-       {
                fscxt = CreateGlobalMemory("Filesystem");
-       }
        currentContext = MemoryContextSwitchTo((MemoryContext) fscxt);
 
        lobjDesc = inv_open(lobjId, mode);
@@ -171,9 +169,7 @@ lo_creat(int mode)
        Oid                     lobjId;
 
        if (fscxt == NULL)
-       {
                fscxt = CreateGlobalMemory("Filesystem");
-       }
 
        currentContext = MemoryContextSwitchTo((MemoryContext) fscxt);
 
index ba703cb681416fc05ab3192d081588feeabcc143..38b4536ccf95c4fff45fa63fd370843ee7f16716 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/libpq/Attic/be-pqexec.c,v 1.16 1998/06/04 17:26:39 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/libpq/Attic/be-pqexec.c,v 1.17 1998/06/15 19:28:25 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -77,17 +77,11 @@ PQfn(int fnid,
        for (i = 0; i < nargs; i++)
        {
                if (args[i].len == VAR_LENGTH_ARG)
-               {
                        arg[i] = (char *) args[i].u.ptr;
-               }
                else if (args[i].len > sizeof(int4))
-               {
                        elog(ERROR, "arg_length of argument %d too long", i);
-               }
                else
-               {
                        arg[i] = (char *) args[i].u.integer;
-               }
        }
 
        /* ----------------
@@ -107,13 +101,9 @@ PQfn(int fnid,
                return "0";
 
        if (result_is_int)
-       {
                *result_buf = (int) retval;
-       }
        else
-       {
                memmove(result_buf, retval, result_len);
-       }
        return "G";
 }
 
index 2dcb4f1be95858f4991bab33f36a4aab9ed390b7..50ef9d4ca9f9a30bd51b6918c66d40507e254715 100644 (file)
@@ -145,9 +145,7 @@ crypt_loadpwdfile()
                {                                               /* free the old data only if this is a
                                                                 * reload */
                        while (pwd_cache_count--)
-                       {
                                free((void *) pwd_cache[pwd_cache_count]);
-                       }
                        free((void *) pwd_cache);
                        pwd_cache = NULL;
                        pwd_cache_count = 0;
index a0098c65188154fb45c6a294f1ec57732b55a702..80c149b062db85adcae422340b4b25fde5e72543 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.32 1998/06/13 05:14:55 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.33 1998/06/15 19:28:26 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -995,9 +995,7 @@ GetCharSetByHost(char TableName[], int host, const char DataDir[])
                                                                        /* Read the charset */
                                                                        next_token(file, buf, sizeof(buf));
                                                                        if (buf[0] != '\0')
-                                                                       {
                                                                                strcpy(HostCharset, buf);
-                                                                       }
                                                                }
                                                        }
                                                        break;
@@ -1005,9 +1003,7 @@ GetCharSetByHost(char TableName[], int host, const char DataDir[])
                                                        /* Read the base charset */
                                                        next_token(file, buf, sizeof(buf));
                                                        if (buf[0] != '\0')
-                                                       {
                                                                strcpy(BaseCharset, buf);
-                                                       }
                                                        break;
                                                case KEY_TABLE:
                                                        /* Read the original charset */
@@ -1046,9 +1042,7 @@ GetCharSetByHost(char TableName[], int host, const char DataDir[])
        {
                if (!strcasecmp(BaseCharset, ChArray[i]->Orig) &&
                        !strcasecmp(HostCharset, ChArray[i]->Dest))
-               {
                        strncpy(TableName, ChArray[i]->Table, 79);
-               }
                free((struct CharsetItem *) ChArray[i]);
        }
 }
index 1bb503bdcf0da62818e8224983901f328da5e928..af3a4c6f7e2ab51b8598e4adca590a218245dfea 100644 (file)
@@ -48,9 +48,7 @@ verify_password(char *auth_arg, char *user, char *password)
                test_pw = strtok(NULL, ":");
                if (!test_user || !test_pw ||
                        test_user[0] == '\0' || test_pw[0] == '\0')
-               {
                        continue;
-               }
 
                /* kill the newline */
                if (test_pw[strlen(test_pw) - 1] == '\n')
index 922b622b4e58dd99f37a8517a02d496f874f1923..ac0d064a06afa6957314c2e5aaa641e667bd4232 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/libpq/Attic/portal.c,v 1.13 1998/02/26 04:31:51 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/libpq/Attic/portal.c,v 1.14 1998/06/15 19:28:27 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -119,9 +119,7 @@ PQnportals(int rule_p)
                if (portals[i] && portals[i]->portal)
                {
                        if (!rule_p || portals[i]->portal->rule_p)
-                       {
                                ++n;
-                       }
                }
        }
        return (n);
@@ -690,9 +688,7 @@ PQnotifies_init()
        PQNotifyList *p;
 
        if (pqNotifyList == NULL)
-       {
                pqNotifyList = DLNewList();
-       }
        else
        {
                /* clean all notifies */
index 4e1a2659ced3983a0947ce40210ea259eb435242..a3ff7bcffd1cffe4a52300347e1ecb1f74ddc60a 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/libpq/pqcomm.c,v 1.43 1998/05/29 17:00:07 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/libpq/pqcomm.c,v 1.44 1998/06/15 19:28:27 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -89,13 +89,9 @@ pq_init(int fd)
                elog(FATAL, "pq_init: Couldn't initialize socket connection");
        PQnotifies_init();
        if (getenv("LIBPQ_DEBUG"))
-       {
                Pfdebug = stderr;
-       }
        else
-       {
                Pfdebug = NULL;
-       }
 }
 
 /* -------------------------
@@ -229,9 +225,7 @@ PQgetline(char *s, int maxlen)
                return (EOF);
 
        if (fgets(s, maxlen - 1, Pfin) == NULL)
-       {
                return feof(Pfin) ? EOF : 1;
-       }
        else
        {
                for (; *s; s++)
@@ -643,9 +637,7 @@ StreamServerPort(char *hostName, short portName, int *fdP)
 
        *fdP = fd;
        if (family == AF_UNIX)
-       {
                chmod(sock_path, 0777);
-       }
        return (STATUS_OK);
 }
 
index 32abbe0a8e0cd9d0ad71214571b79581322e4529..8829af19ca3891ddc4bd6066f388687561d48668 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/libpq/pqsignal.c,v 1.7 1997/09/08 02:23:19 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/libpq/pqsignal.c,v 1.8 1998/06/15 19:28:27 momjian Exp $
  *
  * NOTES
  *             This shouldn't be in libpq, but the monitor and some other
@@ -56,9 +56,7 @@ pqsignal(int signo, pqsigfunc func)
        sigemptyset(&act.sa_mask);
        act.sa_flags = 0;
        if (signo != SIGALRM)
-       {
                act.sa_flags |= SA_RESTART;
-       }
        if (sigaction(signo, &act, &oact) < 0)
                return (SIG_ERR);
        return (oact.sa_handler);
index bdb3117dfa29d768556f12ba30cb1bcc78265aa6..30e7ed3bc5d65d296934b72f56291617ee9f8e2c 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/main/main.c,v 1.20 1998/06/04 17:26:40 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/main/main.c,v 1.21 1998/06/15 19:28:28 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -72,9 +72,7 @@ main(int argc, char *argv[])
 #if defined(__alpha)
        if (setsysinfo(SSI_NVPAIRS, buffer, 1, (caddr_t) NULL,
                                   (unsigned long) NULL) < 0)
-       {
                elog(NOTICE, "setsysinfo failed: %d\n", errno);
-       }
 #endif
 
 #endif                                                 /* NOFIXADE || NOPRINTADE */
index 40d8abce0c2c31111865bdca598b504cdcf80410..e43fd13d52484b356c2a44b2e7ac3756c68a59b2 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.41 1998/02/26 04:32:04 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/nodes/copyfuncs.c,v 1.42 1998/06/15 19:28:30 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -45,9 +45,7 @@ listCopy(List *list)
        foreach(l, list)
        {
                if (newlist == NIL)
-               {
                        newlist = nl = lcons(lfirst(l), NIL);
-               }
                else
                {
                        lnext(nl) = lcons(lfirst(l), NIL);
@@ -842,9 +840,7 @@ _copyConst(Const *from)
                }
        }
        else
-       {
                newnode->constvalue = from->constvalue;
-       }
        newnode->constisnull = from->constisnull;
        newnode->constbyval = from->constbyval;
        newnode->constisset = from->constisset;
@@ -1108,9 +1104,7 @@ CopyPathFields(Path *from, Path *newnode)
                }
        }
        else
-       {
                Node_Copy(from, newnode, p_ordering.ord.merge);
-       }
 
        Node_Copy(from, newnode, keys);
 
@@ -1829,9 +1823,7 @@ copyObject(void *from)
                                foreach(l, list)
                                {
                                        if (newlist == NIL)
-                                       {
                                                newlist = nl = lcons(copyObject(lfirst(l)), NIL);
-                                       }
                                        else
                                        {
                                                lnext(nl) = lcons(copyObject(lfirst(l)), NIL);
index e0e7f7f9becff0a975ff5b505b451f10bb4125a0..2b826cdc9f480e8ddf4190bbb5bfff25df9823ba 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/nodes/list.c,v 1.12 1998/02/26 04:32:08 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/nodes/list.c,v 1.13 1998/06/15 19:28:31 momjian Exp $
  *
  * NOTES
  *       XXX a few of the following functions are duplicated to handle
@@ -122,9 +122,7 @@ nreverse(List *list)
                return (list);
 
        for (p = list; p != NULL; p = lnext(p))
-       {
                rlist = lcons(lfirst(p), rlist);
-       }
 
        lfirst(list) = lfirst(rlist);
        lnext(list) = lnext(rlist);
@@ -324,9 +322,7 @@ LispUnion(List *l1, List *l2)
                }
        }
        foreach(i, l2)
-       {
                retval = lappend(retval, lfirst(i));
-       }
 
        return (retval);
 }
@@ -356,9 +352,7 @@ LispUnioni(List *l1, List *l2)
                }
        }
        foreach(i, l2)
-       {
                retval = lappendi(retval, lfirsti(i));
-       }
 
        return (retval);
 }
@@ -410,13 +404,9 @@ lremove(void *elem, List *list)
        if (l != NULL)
        {
                if (prev == NIL)
-               {
                        result = lnext(list);
-               }
                else
-               {
                        lnext(prev) = lnext(l);
-               }
        }
        return result;
 }
index c29730db2fe14e15458d46b7d8ab08da4c09163b..dcba4e8c8896094b2e073235f990b69696113e55 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.35 1998/05/09 23:46:35 thomas Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/nodes/outfuncs.c,v 1.36 1998/06/15 19:28:32 momjian Exp $
  *
  * NOTES
  *       Every (plan) node in POSTGRES has an associated "out" routine which
@@ -690,9 +690,7 @@ _outFjoin(StringInfo str, Fjoin *node)
 
        appendStringInfo(str, " :alwaysdone ");
        for (i = 0; i < node->fj_nNodes; i++)
-       {
                appendStringInfo(str, (node->fj_alwaysDone[i]) ? "true" : "false");
-       }
 }
 
 /*
@@ -779,13 +777,9 @@ _outConst(StringInfo str, Const *node)
        appendStringInfo(str, node->constisnull ? "true" : "false");
        appendStringInfo(str, " :constvalue ");
        if (node->constisnull)
-       {
                appendStringInfo(str, "<>");
-       }
        else
-       {
                _outDatum(str, node->constvalue, node->consttype);
-       }
        appendStringInfo(str, " :constbyval ");
        appendStringInfo(str, node->constbyval ? "true" : "false");
 }
@@ -1496,9 +1490,7 @@ _outDatum(StringInfo str, Datum value, Oid type)
                         * without casting it to int first!! -mer 8 Jan 1991
                         */
                        if (((int) length) <= -1)
-                       {
                                length = VARSIZE(s);
-                       }
                        sprintf(buf, " %d [ ", length);
                        appendStringInfo(str, buf);
                        for (i = 0; i < length; i++)
index 4ac0ee06838171b243b44d00f0380fb1eafa8e6d..54e64433b199279e953cf395e316e1005799f62a 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/nodes/print.c,v 1.14 1998/01/20 05:03:54 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/nodes/print.c,v 1.15 1998/06/15 19:28:32 momjian Exp $
  *
  * HISTORY
  *       AUTHOR                        DATE                    MAJOR EVENT
@@ -69,9 +69,7 @@ pprint(void *obj)
        for (;;)
        {
                for (j = 0; j < indentLev * 3; j++)
-               {
                        line[j] = ' ';
-               }
                for (; j < 75 && s[i] != '\0'; i++, j++)
                {
                        line[j] = s[i];
@@ -109,9 +107,7 @@ pprint(void *obj)
                                                printf("%s\n", line);
                                                /* print the line before : and resets */
                                                for (j = 0; j < indentLev * 3; j++)
-                                               {
                                                        line[j] = ' ';
-                                               }
                                        }
                                        line[j] = s[i];
                                        break;
@@ -123,9 +119,7 @@ pprint(void *obj)
                printf("%s\n", line);
        }
        if (j != 0)
-       {
                printf("%s\n", line);
-       }
        fflush(stdout);
        return;
 }
@@ -211,14 +205,10 @@ print_expr(Node *expr, List *rtable)
                        print_expr((Node *) get_rightop(e), rtable);
                }
                else
-               {
                        printf("an expr");
-               }
        }
        else
-       {
                printf("not an expr");
-       }
 }
 
 /*
@@ -258,13 +248,9 @@ print_tl(List *tlist, List *rtable)
 
                printf("\t%d %s\t", tle->resdom->resno, tle->resdom->resname);
                if (tle->resdom->reskey != 0)
-               {
                        printf("(%d):\t", tle->resdom->reskey);
-               }
                else
-               {
                        printf("    :\t");
-               }
                print_expr(tle->expr, rtable);
                printf("\n");
        }
index a0a627899c2e2958f372a1acef51862bb6e706a0..47938774c4bdf854c8e23894324da94e6de1d96b 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/nodes/read.c,v 1.11 1998/02/26 04:32:16 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/nodes/read.c,v 1.12 1998/06/15 19:28:32 momjian Exp $
  *
  * HISTORY
  *       AUTHOR                        DATE                    MAJOR EVENT
@@ -78,9 +78,7 @@ nodeTokenType(char *token, int length)
                 * skip the optional '-' (i.e. negative number)
                 */
                if (*token == '-')
-               {
                        token++;
-               }
 
                /*
                 * See if there is a decimal point
@@ -127,9 +125,7 @@ lsptok(char *string, int *length)
        {
                local_str = string;
                if (length == NULL)
-               {
                        return (NULL);
-               }
        }
 
        for (; *local_str == ' '
@@ -159,9 +155,7 @@ lsptok(char *string, int *length)
        }
        else if (*local_str == ')' || *local_str == '(' ||
                         *local_str == '}' || *local_str == '{')
-       {
                local_str++;
-       }
        else
        {
                for (; *local_str != ' '
@@ -223,9 +217,7 @@ nodeRead(bool read_car_only)
                                this_value = (Node *) l;
                        }
                        else
-                       {
                                this_value = nodeRead(false);
-                       }
                        break;
                case RIGHT_PAREN:
                        this_value = NULL;
@@ -241,13 +233,9 @@ nodeRead(bool read_car_only)
                                 * It might be NULL but it is an atom!
                                 */
                                if (read_car_only)
-                               {
                                        make_dotted_pair_cell = false;
-                               }
                                else
-                               {
                                        make_dotted_pair_cell = true;
-                               }
                        }
                        else
                        {
@@ -293,18 +281,12 @@ nodeRead(bool read_car_only)
                lfirst(l) = this_value;
 
                if (!read_car_only)
-               {
                        lnext(l) = nodeRead(false);
-               }
                else
-               {
                        lnext(l) = NULL;
-               }
                return_value = (Node *) l;
        }
        else
-       {
                return_value = this_value;
-       }
        return (return_value);
 }
index 9b54731cfb08704af8455c3963963248434405c5..514d0a09c954ad3776f7604f7426c945713c9ac0 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.29 1998/04/27 02:58:07 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/nodes/readfuncs.c,v 1.30 1998/06/15 19:28:33 momjian Exp $
  *
  * NOTES
  *       Most of the read functions for plan nodes are tested. (In fact, they
@@ -238,9 +238,7 @@ _getPlan(Plan *node)
        token = lsptok(NULL, &length);          /* now get the state */
 
        if (length == 0)
-       {
                node->state = (EState *) NULL;
-       }
        else
        {                                                       /* Disgusting hack until I figure out what
                                                                 * to do here */
@@ -758,29 +756,17 @@ _readExpr()
        token = lsptok(NULL, &length);          /* eat :opType */
        token = lsptok(NULL, &length);          /* get opType */
        if (!strncmp(token, "op", 2))
-       {
                local_node->opType = OP_EXPR;
-       }
        else if (!strncmp(token, "func", 4))
-       {
                local_node->opType = FUNC_EXPR;
-       }
        else if (!strncmp(token, "or", 2))
-       {
                local_node->opType = OR_EXPR;
-       }
        else if (!strncmp(token, "and", 3))
-       {
                local_node->opType = AND_EXPR;
-       }
        else if (!strncmp(token, "not", 3))
-       {
                local_node->opType = NOT_EXPR;
-       }
        else if (!strncmp(token, "subp", 4))
-       {
                local_node->opType = SUBPLAN_EXPR;
-       }
 
        token = lsptok(NULL, &length);          /* eat :oper */
        local_node->oper = nodeRead(true);
@@ -953,13 +939,9 @@ _readConst()
        token = lsptok(NULL, &length);          /* now read it */
 
        if (!strncmp(token, "true", 4))
-       {
                local_node->constisnull = true;
-       }
        else
-       {
                local_node->constisnull = false;
-       }
 
 
        token = lsptok(NULL, &length);          /* get :constvalue */
@@ -981,13 +963,9 @@ _readConst()
        token = lsptok(NULL, &length);          /* now read it */
 
        if (!strncmp(token, "true", 4))
-       {
                local_node->constbyval = true;
-       }
        else
-       {
                local_node->constbyval = false;
-       }
 
        return (local_node);
 }
@@ -1019,13 +997,9 @@ _readFunc()
        token = lsptok(NULL, &length);          /* now read it */
 
        if (!strncmp(token, "true", 4))
-       {
                local_node->funcisindex = true;
-       }
        else
-       {
                local_node->funcisindex = false;
-       }
 
        token = lsptok(NULL, &length);          /* get :funcsize */
        token = lsptok(NULL, &length);          /* now read it */
@@ -1264,13 +1238,9 @@ _readRel()
        token = lsptok(NULL, &length);          /* now read it */
 
        if (!strncmp(token, "true", 4))
-       {
                local_node->indexed = true;
-       }
        else
-       {
                local_node->indexed = false;
-       }
 
        token = lsptok(NULL, &length);          /* get :pages */
        token = lsptok(NULL, &length);          /* now read it */
@@ -1817,13 +1787,9 @@ _readCInfo()
        token = lsptok(NULL, &length);          /* now read it */
 
        if (!strncmp(token, "true", 4))
-       {
                local_node->notclause = true;
-       }
        else
-       {
                local_node->notclause = false;
-       }
 
        token = lsptok(NULL, &length);          /* get :indexids */
        local_node->indexids = nodeRead(true);          /* now read it */
@@ -1917,24 +1883,16 @@ _readJInfo()
        token = lsptok(NULL, &length);          /* get :mergesortable */
 
        if (!strncmp(token, "true", 4))
-       {
                local_node->mergesortable = true;
-       }
        else
-       {
                local_node->mergesortable = false;
-       }
 
        token = lsptok(NULL, &length);          /* get :hashjoinable */
 
        if (!strncmp(token, "true", 4))
-       {
                local_node->hashjoinable = true;
-       }
        else
-       {
                local_node->hashjoinable = false;
-       }
 
        return (local_node);
 }
@@ -1979,193 +1937,99 @@ parsePlanString(void)
        token = lsptok(NULL, &length);
 
        if (!strncmp(token, "PLAN", length))
-       {
                return_value = _readPlan();
-       }
        else if (!strncmp(token, "RESULT", length))
-       {
                return_value = _readResult();
-       }
        else if (!strncmp(token, "APPEND", length))
-       {
                return_value = _readAppend();
-       }
        else if (!strncmp(token, "JOIN", length))
-       {
                return_value = _readJoin();
-       }
        else if (!strncmp(token, "NESTLOOP", length))
-       {
                return_value = _readNestLoop();
-       }
        else if (!strncmp(token, "MERGEJOIN", length))
-       {
                return_value = _readMergeJoin();
-       }
        else if (!strncmp(token, "HASHJOIN", length))
-       {
                return_value = _readHashJoin();
-       }
        else if (!strncmp(token, "SCAN", length))
-       {
                return_value = _readScan();
-       }
        else if (!strncmp(token, "SEQSCAN", length))
-       {
                return_value = _readSeqScan();
-       }
        else if (!strncmp(token, "INDEXSCAN", length))
-       {
                return_value = _readIndexScan();
-       }
        else if (!strncmp(token, "TEMP", length))
-       {
                return_value = _readTemp();
-       }
        else if (!strncmp(token, "SORT", length))
-       {
                return_value = _readSort();
-       }
        else if (!strncmp(token, "AGGREG", length))
-       {
                return_value = _readAggreg();
-       }
        else if (!strncmp(token, "SUBLINK", length))
-       {
                return_value = _readSubLink();
-       }
        else if (!strncmp(token, "AGG", length))
-       {
                return_value = _readAgg();
-       }
        else if (!strncmp(token, "UNIQUE", length))
-       {
                return_value = _readUnique();
-       }
        else if (!strncmp(token, "HASH", length))
-       {
                return_value = _readHash();
-       }
        else if (!strncmp(token, "RESDOM", length))
-       {
                return_value = _readResdom();
-       }
        else if (!strncmp(token, "EXPR", length))
-       {
                return_value = _readExpr();
-       }
        else if (!strncmp(token, "ARRAYREF", length))
-       {
                return_value = _readArrayRef();
-       }
        else if (!strncmp(token, "ARRAY", length))
-       {
                return_value = _readArray();
-       }
        else if (!strncmp(token, "VAR", length))
-       {
                return_value = _readVar();
-       }
        else if (!strncmp(token, "CONST", length))
-       {
                return_value = _readConst();
-       }
        else if (!strncmp(token, "FUNC", length))
-       {
                return_value = _readFunc();
-       }
        else if (!strncmp(token, "OPER", length))
-       {
                return_value = _readOper();
-       }
        else if (!strncmp(token, "PARAM", length))
-       {
                return_value = _readParam();
-       }
        else if (!strncmp(token, "ESTATE", length))
-       {
                return_value = _readEState();
-       }
        else if (!strncmp(token, "REL", length))
-       {
                return_value = _readRel();
-       }
        else if (!strncmp(token, "TLE", length))
-       {
                return_value = _readTargetEntry();
-       }
        else if (!strncmp(token, "RTE", length))
-       {
                return_value = _readRangeTblEntry();
-       }
        else if (!strncmp(token, "PATH", length))
-       {
                return_value = _readPath();
-       }
        else if (!strncmp(token, "INDEXPATH", length))
-       {
                return_value = _readIndexPath();
-       }
        else if (!strncmp(token, "JOINPATH", length))
-       {
                return_value = _readJoinPath();
-       }
        else if (!strncmp(token, "MERGEPATH", length))
-       {
                return_value = _readMergePath();
-       }
        else if (!strncmp(token, "HASHPATH", length))
-       {
                return_value = _readHashPath();
-       }
        else if (!strncmp(token, "ORDERKEY", length))
-       {
                return_value = _readOrderKey();
-       }
        else if (!strncmp(token, "JOINKEY", length))
-       {
                return_value = _readJoinKey();
-       }
        else if (!strncmp(token, "MERGEORDER", length))
-       {
                return_value = _readMergeOrder();
-       }
        else if (!strncmp(token, "CINFO", length))
-       {
                return_value = _readCInfo();
-       }
        else if (!strncmp(token, "JOINMETHOD", length))
-       {
                return_value = _readJoinMethod();
-       }
        else if (!strncmp(token, "JINFO", length))
-       {
                return_value = _readJInfo();
-       }
        else if (!strncmp(token, "HINFO", length))
-       {
                return_value = _readHInfo();
-       }
        else if (!strncmp(token, "ITER", length))
-       {
                return_value = _readIter();
-       }
        else if (!strncmp(token, "QUERY", length))
-       {
                return_value = _readQuery();
-       }
        else if (!strncmp(token, "SORTCLAUSE", length))
-       {
                return_value = _readSortClause();
-       }
        else if (!strncmp(token, "GROUPCLAUSE", length))
-       {
                return_value = _readGroupClause();
-       }
        else
-       {
                elog(ERROR, "badly formatted planstring \"%.10s\"...\n", token);
-       }
 
        return ((Node *) return_value);
 }
@@ -2202,9 +2066,7 @@ readDatum(Oid type)
        if (byValue)
        {
                if (length > sizeof(Datum))
-               {
                        elog(ERROR, "readValue: byval & length = %d", length);
-               }
                s = (char *) (&res);
                for (i = 0; i < sizeof(Datum); i++)
                {
@@ -2213,9 +2075,7 @@ readDatum(Oid type)
                }
        }
        else if (length <= 0)
-       {
                s = NULL;
-       }
        else if (length >= 1)
        {
                s = (char *) palloc(length);
@@ -2230,9 +2090,7 @@ readDatum(Oid type)
 
        token = lsptok(NULL, &tokenLength); /* skip the ']' */
        if (token[0] != ']')
-       {
                elog(ERROR, "readValue: ']' expected, length =%d", length);
-       }
 
        return (res);
 }
index 8dc2f9fb4bde4bf349f5abfb4d5d93ea7a953edb..4a8d53e7a1288976e456243c6e0895a951a88e05 100644 (file)
@@ -3,7 +3,7 @@
 * geqo_erx.c--
 *       edge recombination crossover [ER]
 *
-* $Id: geqo_erx.c,v 1.8 1998/02/26 04:32:20 momjian Exp $
+* $Id: geqo_erx.c,v 1.9 1998/06/15 19:28:34 momjian Exp $
 *
 *-------------------------------------------------------------------------
 */
@@ -228,9 +228,7 @@ gimme_tour(Edge *edge_table, Gene *new_gene, int num_gene)
                /* find destination for the newly entered point */
 
                if (edge_table[new_gene[i - 1]].unused_edges > 0)
-               {
                        new_gene[i] = gimme_gene(edge_table[(int) new_gene[i - 1]], edge_table);
-               }
 
                else
                {                                               /* cope with fault */
index 67b967533fed06aa273496fcd3fe20a9c1840b20..7430b34bccdca3ec85f21728a546d926470d31ec 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: geqo_eval.c,v 1.18 1998/02/26 04:32:21 momjian Exp $
+ * $Id: geqo_eval.c,v 1.19 1998/06/15 19:28:35 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -131,9 +131,7 @@ gimme_tree(Query *root, Gene *tour, int rel_count, int num_gene, Rel *outer_rel)
                                        new_rels = lcons(gimme_clauseless_join(outer_rel, outer_rel), NIL); /* ??? MAU */
                                }
                                else
-                               {
                                        new_rels = lcons(gimme_clauseless_join(outer_rel, inner_rel), NIL);
-                               }
                        }
 
                        /* process new_rel->pathlist */
@@ -221,9 +219,7 @@ gimme_clause_joins(Query *root, Rel *outer_rel, Rel *inner_rel)
                                        rel = init_join_rel(outer_rel, get_join_rel(root, other_rels), joininfo);
                                }
                                else
-                               {
                                        rel = NULL;
-                               }
 
                                if (rel != NULL)
                                        join_list = lappend(join_list, rel);
@@ -700,18 +696,12 @@ geqo_joinrel_size(Rel *joinrel, Rel *outer_rel, Rel *inner_rel)
        temp = (Cost) inner_rel->tuples * (Cost) outer_rel->tuples; /* cartesian product */
 
        if (joinrel->clauseinfo)
-       {
                temp = temp * product_selec(joinrel->clauseinfo);
-       }
 
        if (temp >= (MAXINT - 1))
-       {
                ntuples = ceil(geqo_log((double) temp, (double) GEQO_LOG_BASE));
-       }
        else
-       {
                ntuples = ceil((double) temp);
-       }
 
        if (ntuples < 1)
                ntuples = 1;                    /* make the best case 1 instead of 0 */
index edb29e5154a6c6a7a01cd48e9a9f61ddf5734023..99b968ec3b6016dd8f6f3bb8c0b178ebcc776347 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: geqo_misc.c,v 1.7 1998/01/07 21:03:44 momjian Exp $
+ * $Id: geqo_misc.c,v 1.8 1998/06/15 19:28:35 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -269,16 +269,12 @@ geqo_print_rel(Query *root, Rel *rel)
        printf("______________________________\n");
        printf("(");
        foreach(l, rel->relids)
-       {
                printf("%d ", lfirsti(l));
-       }
        printf("): size=%d width=%d\n", rel->size, rel->width);
 
        printf("\tpath list:\n");
        foreach(l, rel->pathlist)
-       {
                geqo_print_path(root, lfirst(l), 1);
-       }
 
        printf("\tcheapest path:\n");
        geqo_print_path(root, rel->cheapestpath, 1);
index 0deed36e16fb7579ac1b6508a1520fed041dcccb..0b1636125df28478cdf0080779248965a22fcc09 100644 (file)
@@ -5,7 +5,7 @@
 *
 * Copyright (c) 1994, Regents of the University of California
 *
-* $Id: geqo_params.c,v 1.8 1997/09/08 21:44:30 momjian Exp $
+* $Id: geqo_params.c,v 1.9 1998/06/15 19:28:36 momjian Exp $
 *
 *-------------------------------------------------------------------------
 */
@@ -205,9 +205,7 @@ geqo_params(int string_length)
        }
 
        else
-       {
                elog(DEBUG, "geqo_params: ga parameter file\n\'%s\'\ndoes not exist or permissions are not setup correctly", conf_file);
-       }
 
        /*
         * parameter checkings follow
@@ -317,13 +315,9 @@ gimme_pool_size(int string_length)
        size = pow(2.0, exponent);
 
        if (size < MIN_POOL)
-       {
                return (MIN_POOL);
-       }
        else if (size > MAX_POOL)
-       {
                return (MAX_POOL);
-       }
        else
                return ((int) ceil(size));
 }
index f347ebb784a4b985d1f900f36fa751da05772ce2..a46a6c30a039ad8312dd34d0b3bb3a57afc4012d 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: geqo_paths.c,v 1.8 1998/02/26 04:32:23 momjian Exp $
+ * $Id: geqo_paths.c,v 1.9 1998/06/15 19:28:37 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -147,9 +147,7 @@ set_paths(Rel *rel, Path *unorderedpath)
                rel->pathlist = lremove(unorderedpath, rel->pathlist);
        }
        else
-       {
                rel->unorderedpath = (Path *) unorderedpath;
-       }
 
        return (cheapest);
 }
index 5d13b48b2548266961ad63093ef8ea64519a7433..84210a4a437db1cc77f18dbcf30dee4d155894b1 100644 (file)
@@ -5,7 +5,7 @@
  *
  * Copyright (c) 1994, Regents of the University of California
  *
- * $Id: geqo_pool.c,v 1.7 1998/04/06 02:38:04 momjian Exp $
+ * $Id: geqo_pool.c,v 1.8 1998/06/15 19:28:37 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -66,9 +66,7 @@ alloc_pool(int pool_size, int string_length)
        /* all gene */
        chromo = (Chromosome *) new_pool->data;         /* vector of all chromos */
        for (i = 0; i < pool_size; i++)
-       {
                chromo[i].string = palloc((string_length + 1) * sizeof(Gene));
-       }
 
        return (new_pool);
 }
index 6751d566b32f0ae5235a611ab14665c8e0307ac6..7731710a0dbf0daeb3427ba3f17ba085fcb36740 100644 (file)
@@ -6,7 +6,7 @@
 *       PX operator according to Syswerda
 *       (The Genetic Algorithms Handbook, L Davis, ed)
 *
-* $Id: geqo_px.c,v 1.4 1997/09/08 21:44:35 momjian Exp $
+* $Id: geqo_px.c,v 1.5 1998/06/15 19:28:37 momjian Exp $
 *
 *-------------------------------------------------------------------------
 */
@@ -70,9 +70,7 @@ px(Gene *tour1, Gene *tour2, Gene *offspring, int num_gene, City *city_table)
 
        /* initialize city table */
        for (i = 1; i <= num_gene; i++)
-       {
                city_table[i].used = 0;
-       }
 
        /* choose random positions that will be inherited directly from parent */
        num_positions = geqo_randint(2 * num_gene / 3, num_gene / 3);
index bb5863fec705dbcc47d8020d329335a35d93178c..9d5eba97d6870cc96c5c2d90c8ff0ef7f30a8587 100644 (file)
@@ -7,7 +7,7 @@
 *
 *
 * IDENTIFICATION
-*       $Header: /cvsroot/pgsql/src/backend/optimizer/geqo/Attic/minspantree.c,v 1.4 1997/09/08 21:44:42 momjian Exp $
+*       $Header: /cvsroot/pgsql/src/backend/optimizer/geqo/Attic/minspantree.c,v 1.5 1998/06/15 19:28:38 momjian Exp $
 *
 *-------------------------------------------------------------------------
 */
@@ -88,9 +88,7 @@ minspantree(Query *root, List *join_rels, Rel *garel)
                id2 = (int) lsecond(joinrel->relids);
 
                if (id1 > id2)
-               {
                        tmprel_array[id2][id1] = *(Rel *) joinrel;
-               }
                else
                {
                        tmprel_array[id1][id2] = *(Rel *) joinrel;      /* ever reached? */
@@ -121,25 +119,17 @@ minspantree(Query *root, List *join_rels, Rel *garel)
                {
                        garel[1] = tmprel_array[1][3];
                        if (rel12->cheapestpath->path_cost > rel23->cheapestpath->path_cost)
-                       {
                                garel[2] = tmprel_array[2][3];
-                       }
                        else
-                       {
                                garel[2] = tmprel_array[1][2];
-                       }
                }
                else
                {
                        garel[1] = tmprel_array[1][2];
                        if (rel13->cheapestpath->path_cost > rel23->cheapestpath->path_cost)
-                       {
                                garel[2] = tmprel_array[2][3];
-                       }
                        else
-                       {
                                garel[2] = tmprel_array[1][3];
-                       }
                }
        }
 
@@ -169,13 +159,9 @@ minspantree(Query *root, List *join_rels, Rel *garel)
                                if (connectto[tempn] != 0)
                                {
                                        if (n > tempn)
-                                       {
                                                joinrel = (Rel *) &tmprel_array[tempn][n];
-                                       }
                                        else
-                                       {
                                                joinrel = (Rel *) &tmprel_array[n][tempn];
-                                       }
                                        dist = joinrel->cheapestpath->path_cost;
 
                                        if (dist < disttoconnect[tempn])
@@ -192,13 +178,9 @@ minspantree(Query *root, List *join_rels, Rel *garel)
                        }
                        n = nextn;
                        if (n > connectto[n])
-                       {
                                garel[i] = tmprel_array[connectto[n]][n];
-                       }
                        else
-                       {
                                garel[i] = tmprel_array[n][connectto[n]];
-                       }
                        i++;
                }
 
index 8548dcf54268a43bf9055ce6902db6891b583e99..53b78cdfdc1fa3f2e3a11b0d9fce44fc99a19d1b 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.15 1998/02/26 04:32:27 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/optimizer/path/allpaths.c,v 1.16 1998/06/15 19:28:38 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -259,9 +259,7 @@ find_join_paths(Query *root, List *outer_rels, int levels_needed)
                        root->join_relation_list_ = outer_rels;
                }
                else
-               {
                        root->join_relation_list_ = new_rels;
-               }
                if (!BushyPlanFlag)
                        outer_rels = new_rels;
        }
@@ -407,16 +405,12 @@ debug_print_rel(Query *root, Rel *rel)
 
        printf("(");
        foreach(l, rel->relids)
-       {
                printf("%d ", lfirsti(l));
-       }
        printf("): size=%d width=%d\n", rel->size, rel->width);
 
        printf("\tpath list:\n");
        foreach(l, rel->pathlist)
-       {
                print_path(root, lfirst(l), 1);
-       }
        printf("\tcheapest path:\n");
        print_path(root, rel->cheapestpath, 1);
 }
index 5e723d9603e491ad1a705d3bb87ecb6313a27837..ef7b59023470184c969d4e9ee3088840a550b490 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/optimizer/path/clausesel.c,v 1.7 1998/04/27 04:05:49 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/optimizer/path/clausesel.c,v 1.8 1998/06/15 19:28:39 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -54,9 +54,7 @@ set_clause_selectivities(List *clauseinfo_list, Cost new_selectivity)
                clausenode = (CInfo *) lfirst(temp);
                cost_clause = clausenode->selectivity;
                if (FLOAT_IS_ZERO(cost_clause) || new_selectivity < cost_clause)
-               {
                        clausenode->selectivity = new_selectivity;
-               }
        }
 }
 
@@ -225,18 +223,14 @@ compute_selec(Query *root, List *clauses, List *or_selectivities)
        List       *clause = lfirst(clauses);
 
        if (clauses == NULL)
-       {
                s1 = 1.0;
-       }
        else if (IsA(clause, Param))
        {
                /* XXX How're we handling this before?? -ay */
                s1 = 1.0;
        }
        else if (IsA(clause, Const))
-       {
                s1 = ((bool) ((Const *) clause)->constvalue) ? 1.0 : 0.0;
-       }
        else if (IsA(clause, Var))
        {
                Oid                     relid = getrelid(((Var *) clause)->varno,
@@ -369,9 +363,7 @@ compute_selec(Query *root, List *clauses, List *or_selectivities)
         */
 
        if (length(clauses) < 2)
-       {
                return (s1);
-       }
        else
        {
                /* Compute selectivity of the 'or'ed subclauses. */
index b86e727da464e83dfe7f3d3b4fdc7ec6f73a671e..efe2fab25d9a481de44709e2c237deef23821a3b 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/optimizer/path/costsize.c,v 1.20 1998/01/13 04:04:06 scrappy Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/optimizer/path/costsize.c,v 1.21 1998/06/15 19:28:39 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -368,13 +368,9 @@ compute_rel_size(Rel *rel)
        temp = rel->tuples * product_selec(rel->clauseinfo);
        Assert(temp >= 0);
        if (temp >= (MAXINT - 1))
-       {
                temp1 = MAXINT;
-       }
        else
-       {
                temp1 = ceil((double) temp);
-       }
        Assert(temp1 >= 0);
        Assert(temp1 <= MAXINT);
        return (temp1);
@@ -449,9 +445,7 @@ compute_joinrel_size(JoinPath *joinpath)
 
        temp = temp * product_selec(joinpath->pathclauseinfo);
        if (temp >= (MAXINT - 1))
-       {
                temp1 = MAXINT;
-       }
        else
        {
 
index 0a960033302deffa675d693f80b48dae2efee408..fec093cd67abe39ca45617ab5378cddb4574e827 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.15 1998/04/27 04:05:53 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/optimizer/path/indxpath.c,v 1.16 1998/06/15 19:28:40 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -662,9 +662,7 @@ match_clause_to_indexkey(Rel *rel,
                else if (leftop
                                 && match_index_to_operand(indexkey,
                                                                                   (Expr *) leftop, rel, index))
-               {
                        join_op = ((Oper *) ((Expr *) clause)->oper)->opno;
-               }
 
                if (join_op && op_class(join_op, xclass, index->relam) &&
                        join_clause_p((Node *) clause))
@@ -943,9 +941,7 @@ clause_pred_clause_test(Expr *predicate, Node *clause)
                !IsA(predicate->oper, Oper) ||
                !IsA(pred_var, Var) ||
                !IsA(pred_const, Const))
-       {
                return false;
-       }
 
        /*
         * The implication can't be determined unless the predicate and the
@@ -1161,9 +1157,7 @@ extract_restrict_clauses(List *clausegroup)
                CInfo      *cinfo = lfirst(l);
 
                if (!join_clause_p((Node *) cinfo->clause))
-               {
                        restrict_cls = lappend(restrict_cls, cinfo);
-               }
        }
        return restrict_cls;
 }
@@ -1293,9 +1287,7 @@ create_index_paths(Query *root,
                        if (!(join_clause_p((Node *) clauseinfo->clause) &&
                                  equal_path_merge_ordering(index->ordering,
                                                                                        clauseinfo->mergesortorder)))
-                       {
                                temp = false;
-                       }
                }
 
                if (!join || temp)
index fd584d6a1d4760286205a926c8117c22e65831b5..33448a6c037b4e0a5cec9abd2d23075b511f2cb9 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinpath.c,v 1.5 1997/09/08 21:44:59 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinpath.c,v 1.6 1998/06/15 19:28:40 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -180,9 +180,7 @@ find_all_join_paths(Query *root, List *joinrels)
                         * wierd behavior.
                         */
                        if (IsA_JoinPath(path))
-                       {
                                ((Path *) lfirst(path))->outerjoincost = (Cost) 0;
-                       }
 
                        /*
                         * do it iff it is a join path, which is not always true, esp
@@ -354,9 +352,7 @@ match_unsorted_outer(Rel *joinrel,
                }
 
                if (xmergeinfo)
-               {
                        clauses = xmergeinfo->jmethod.clauses;
-               }
 
                if (clauses)
                {
@@ -374,19 +370,13 @@ match_unsorted_outer(Rel *joinrel,
                                                                  joinrel->targetlist, clauses);
                }
                else
-               {
                        merge_pathkeys = outerpath->keys;
-               }
 
                if (best_innerjoin &&
                        path_is_cheaper(best_innerjoin, cheapest_inner))
-               {
                        nestinnerpath = best_innerjoin;
-               }
                else
-               {
                        nestinnerpath = cheapest_inner;
-               }
 
                paths = lcons(create_nestloop_path(joinrel,
                                                                                   outerrel,
@@ -429,13 +419,9 @@ match_unsorted_outer(Rel *joinrel,
                         * wouldn't otherwise be considered.
                         */
                        if (path_is_cheaper_than_sort)
-                       {
                                mergeinnerpath->outerjoincost = outerpath->path_cost;
-                       }
                        else
-                       {
                                mergeinnerpath = cheapest_inner;
-                       }
 
                        temp_node =
                                lcons(create_mergesort_path(joinrel,
@@ -453,9 +439,7 @@ match_unsorted_outer(Rel *joinrel,
                                          paths);
                }
                else
-               {
                        temp_node = paths;
-               }
                jp_list = nconc(jp_list, temp_node);
        }
        return (jp_list);
@@ -518,9 +502,7 @@ match_unsorted_inner(Rel *joinrel,
                }
 
                if (xmergeinfo)
-               {
                        clauses = ((JoinMethod *) xmergeinfo)->clauses;
-               }
 
                if (clauses)
                {
index 002772534683fd778d92c724a788815fa4cb997b..48b0b28c52f22439349462ce406e4ff6ce27d106 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinrels.c,v 1.9 1998/03/30 16:46:45 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/optimizer/path/joinrels.c,v 1.10 1998/06/15 19:28:40 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -138,9 +138,7 @@ find_clause_joins(Query *root, Rel *outer_rel, List *joininfo_list)
                                                                                joininfo);
                                }
                                else
-                               {
                                        rel = NULL;
-                               }
 
                                if (rel != NULL)
                                        join_list = lappend(join_list, rel);
index 2dfad7ec594f73fc94639ec03ce5fb2fb30f0c61..f1deabea5d5422cedd8c0465cfa9fab2e17a8e7f 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/joinutils.c,v 1.5 1998/02/26 04:32:40 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/joinutils.c,v 1.6 1998/06/15 19:28:41 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -106,16 +106,12 @@ match_pathkeys_joinkeys(List *pathkeys,
                        joinkeys = LispRemove(xjoinkey, joinkeys);
                }
                else
-               {
                        return (NIL);
-               }
 
        }
        if (matched_joinkeys == NULL ||
                length(matched_joinkeys) != length(pathkeys))
-       {
                return NIL;
-       }
 
        *matchedJoinClausesPtr = nreverse(matched_joinclauses);
        return (nreverse(matched_joinkeys));
@@ -239,9 +235,7 @@ match_paths_joinkeys(List *joinkeys,
                                        matched_path = path;
                        }
                        else
-                       {
                                matched_path = path;
-                       }
                }
        }
        return matched_path;
@@ -341,9 +335,7 @@ new_join_pathkeys(List *outer_pathkeys,
                x = new_join_pathkey(outer_pathkey, NIL,
                                                         join_rel_tlist, joinclauses);
                if (x != NIL)
-               {
                        t_list = lappend(t_list, x);
-               }
        }
        return (t_list);
 }
@@ -396,9 +388,7 @@ new_join_pathkey(List *subkeys,
                                                                                                 matched_subkeys);
                }
                else
-               {
                        newly_considered_subkeys = matched_subkeys;
-               }
 
                considered_subkeys =
                        append(considered_subkeys, newly_considered_subkeys);
index 073aa18eb9a3ce49544b6fec1b7d77e6ab59da35..fc535ba8ba61c96b80ec6313594de0db279d8e1d 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/optimizer/path/orindxpath.c,v 1.5 1998/02/26 04:32:41 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/optimizer/path/orindxpath.c,v 1.6 1998/06/15 19:28:41 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -128,9 +128,7 @@ create_or_index_paths(Query *root,
                                           create_or_index_paths(root, rel, lnext(clauses)));
                        }
                        else
-                       {
                                t_list = create_or_index_paths(root, rel, lnext(clauses));
-                       }
                }
        }
 
@@ -237,21 +235,13 @@ best_or_subclause_index(Query *root,
                Cost            subclause_selec;
 
                if (constant_on_right)
-               {
                        value = ((Const *) get_rightop(subclause))->constvalue;
-               }
                else
-               {
                        value = NameGetDatum("");
-               }
                if (constant_on_right)
-               {
                        flag = (_SELEC_IS_CONSTANT_ || _SELEC_CONSTANT_RIGHT_);
-               }
                else
-               {
                        flag = _SELEC_CONSTANT_RIGHT_;
-               }
                index_selectivity(lfirsti(index->relids),
                                                  index->classlist,
                                                  lconsi(opno, NIL),
index 0a73ea8b33ecb42f4afe2d483cdeb8ac83677510..e67188fa418a8130ce0bde6b032a526f80f90eae 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/predmig.c,v 1.10 1998/03/30 16:46:55 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/predmig.c,v 1.11 1998/06/15 19:28:41 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -444,9 +444,7 @@ xfunc_form_groups(Query *queryInfo, Stream root, Stream bottom)
                                                                                                  primjoin, NIL));
                        }
                        else
-                       {
                                set_groupsel(temp, 1.0);
-                       }
                }
                else
 /* a restriction, or 2-ary join pred */
index 250a670fc43eb354fed7ac0c75eff505144f62cf..85bc780261bd5e32404641c357bffecdedfaf431 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/prune.c,v 1.13 1998/04/02 07:27:15 vadim Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/prune.c,v 1.14 1998/06/15 19:28:41 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -75,9 +75,7 @@ prune_joinrel(Rel *rel, List *other_rels)
                                                                                 other_rel->pathlist);
                }
                else
-               {
                        result = nconc(result, lcons(other_rel, NIL));
-               }
        }
        return (result);
 }
@@ -110,15 +108,11 @@ prune_rel_paths(List *rel_list)
                        path = (Path *) lfirst(y);
 
                        if (!path->p_ordering.ord.sortop)
-                       {
                                break;
-                       }
                }
                cheapest = (JoinPath *) prune_rel_path(rel, path);
                if (IsA_JoinPath(cheapest))
-               {
                        rel->size = compute_joinrel_size(cheapest);
-               }
                else
                        elog(ERROR, "non JoinPath called");
        }
@@ -149,9 +143,7 @@ prune_rel_path(Rel *rel, Path *unorderedpath)
                rel->pathlist = lremove(unorderedpath, rel->pathlist);
        }
        else
-       {
                rel->unorderedpath = (Path *) unorderedpath;
-       }
 
        return (cheapest);
 }
index 935a2422f5214a3db68ff249e2a9860ce56060c7..6aaf09823df207d29f526c0efe9462551d8dea4a 100644 (file)
@@ -9,7 +9,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/xfunc.c,v 1.14 1998/06/15 18:39:26 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/optimizer/path/Attic/xfunc.c,v 1.15 1998/06/15 19:28:42 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -335,13 +335,9 @@ xfunc_pullup(Query *queryInfo,
                                                         (LispValue) get_locclauseinfo(parentpath)));
        /* put new childpath into the path tree */
        if (whichchild == INNER)
-       {
                set_innerjoinpath(parentpath, (pathPtr) newkid);
-       }
        else
-       {
                set_outerjoinpath(parentpath, (pathPtr) newkid);
-       }
 
        /*
         * * recompute parentpath cost from scratch -- the cost * of the join
@@ -497,9 +493,7 @@ xfunc_func_expense(LispValue node, LispValue args)
                        elog(ERROR, "Oper's function is undefined");
        }
        else
-       {
                funcid = get_funcid((Func) node);
-       }
 
        /* look up tuple in cache */
        tupl = SearchSysCacheTuple(PROOID, ObjectIdGetDatum(funcid), 0, 0, 0);
@@ -1188,9 +1182,7 @@ xfunc_fixvars(LispValue clause, /* clause being pulled up */
                         tmpclause = lnext(tmpclause))
                        xfunc_fixvars(lfirst(tmpclause), rel, varno);
        else
-       {
                elog(ERROR, "Clause node of undetermined type");
-       }
 }
 
 
@@ -1411,9 +1403,7 @@ xfunc_LispRemove(LispValue foo, List bar)
 
        for (temp = bar; !null(temp); temp = lnext(temp))
                if (!equal((Node) (foo), (Node) (lfirst(temp))))
-               {
                        result = lappend(result, lfirst(temp));
-               }
                else
                        sanity = true;          /* found a matching item to remove! */
 
@@ -1444,9 +1434,7 @@ xfunc_copyrel(Rel from, Rel *to)
 
        /* COPY_CHECKARGS() */
        if (to == NULL)
-       {
                return false;
-       }
 
        /* COPY_CHECKNULL() */
        if (from == NULL)
@@ -1458,9 +1446,7 @@ xfunc_copyrel(Rel from, Rel *to)
        /* COPY_NEW(c) */
        newnode = (Rel) (*alloc) (classSize(Rel));
        if (newnode == NULL)
-       {
                return false;
-       }
 
        /* ----------------
         *      copy node superclass fields
index 7c450104ce7906a3b6f21f6dffb500f78f191fea..22d44471ac423a80de3637cb8a8a84e3810ef157 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.27 1998/02/26 04:32:48 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/optimizer/plan/createplan.c,v 1.28 1998/06/15 19:28:42 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -678,9 +678,7 @@ fix_indxqual_references(Node *clause, Path *index_path)
                                while (indexkeys[pos] != 0)
                                {
                                        if (varatt == indexkeys[pos])
-                                       {
                                                break;
-                                       }
                                        pos++;
                                }
                        }
@@ -689,14 +687,10 @@ fix_indxqual_references(Node *clause, Path *index_path)
                        return (newclause);
                }
                else
-               {
                        return (clause);
-               }
        }
        else if (IsA(clause, Const))
-       {
                return (clause);
-       }
        else if (IsA(clause, Param))
        {
                /* Function parameter used as index scan arg.  DZ - 27-8-1996 */
@@ -749,9 +743,7 @@ fix_indxqual_references(Node *clause, Path *index_path)
                                make_clause(expr->opType, expr->oper, new_subclauses);
                }
                else
-               {
                        return (clause);
-               }
        }
        else
        {
@@ -776,13 +768,9 @@ fix_indxqual_references(Node *clause, Path *index_path)
                 * (var const) ...) ?
                 */
                if (new_subclauses)
-               {
                        return (Node *) new_subclauses;
-               }
                else
-               {
                        return (clause);
-               }
        }
 }
 
@@ -1179,9 +1167,7 @@ make_unique(List *tlist, Plan *lefttree, char *uniqueAttr)
        if (strcmp(uniqueAttr, "*") == 0)
                node->uniqueAttr = NULL;
        else
-       {
                node->uniqueAttr = pstrdup(uniqueAttr);
-       }
        return (node);
 }
 
@@ -1209,9 +1195,7 @@ generate_fjoin(List *tlist)
                        fjoinList = lappend(fjoinList, tlistElem);
                }
                else
-               {
                        newTlist = lappend(newTlist, tlistElem);
-               }
        }
 
        /*
index 914788d8bb8bea4a5bdbd7b7a2658ca0c1afe9d1..cacf728f4d44af4dbd81aefae48e67b911283490 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/optimizer/plan/initsplan.c,v 1.11 1998/03/16 05:49:32 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/optimizer/plan/initsplan.c,v 1.12 1998/06/15 19:28:43 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -150,9 +150,7 @@ initialize_base_rels_jinfo(Query *root, List *clauses)
        List       *clause;
 
        foreach(clause, clauses)
-       {
                add_clause_to_rels(root, lfirst(clause));
-       }
        return;
 }
 
index e9f27cd50982e538ef65419f27e3da1058ca49db..9af01930374eec4798fc9913045a3535a8801c8f 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planmain.c,v 1.21 1998/03/31 23:30:49 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/optimizer/plan/planmain.c,v 1.22 1998/06/15 19:28:44 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -162,9 +162,7 @@ query_planner(Query *root,
                                                                                                         (Plan *) scan));
                                        }
                                        else
-                                       {
                                                return ((Plan *) scan);
-                                       }
                                }
                                break;
 
@@ -308,9 +306,7 @@ subplanner(Query *root,
         * it.
         */
        if (final_relation)
-       {
                return (create_plan((Path *) final_relation->cheapestpath));
-       }
        else
        {
                elog(NOTICE, "final relation is nil");
@@ -423,9 +419,7 @@ make_groupPlan(List **tlist,
        }
 
        if (length(glc) != 0)
-       {
                elog(ERROR, "group attribute disappeared from target list");
-       }
 
        /*
         * If non-GroupBy entries were removed from TL - we are to add Vars
index 422ef3cc29aedf8338e226f1118ee5f6b8b69c78..c1e3194133b25543b52308cc381ac22de2ca99e1 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/optimizer/plan/setrefs.c,v 1.21 1998/04/15 15:29:44 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/optimizer/plan/setrefs.c,v 1.22 1998/06/15 19:28:44 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -73,34 +73,22 @@ set_tlist_references(Plan *plan)
                return;
 
        if (IsA_Join(plan))
-       {
                set_join_tlist_references((Join *) plan);
-       }
        else if (IsA(plan, SeqScan) &&plan->lefttree &&
                         IsA_Temp(plan->lefttree))
-       {
                set_tempscan_tlist_references((SeqScan *) plan);
-       }
        else if (IsA(plan, Sort))
-       {
                set_temp_tlist_references((Temp *) plan);
-       }
        else if (IsA(plan, Result))
-       {
                set_result_tlist_references((Result *) plan);
-       }
        else if (IsA(plan, Hash))
-       {
                set_tlist_references(plan->lefttree);
-       }
        else if (IsA(plan, Choose))
        {
                List       *x;
 
                foreach(x, ((Choose *) plan)->chooseplanlist)
-               {
                        set_tlist_references((Plan *) lfirst(x));
-               }
        }
 }
 
@@ -200,9 +188,7 @@ set_temp_tlist_references(Temp *temp)
                                          (source)->targetlist);
        }
        else
-       {
                elog(ERROR, "calling set_temp_tlist_references with empty lefttree");
-       }
 }
 
 /*
@@ -326,9 +312,7 @@ replace_clause_joinvar_refs(Expr *clause,
                        return (NIL);
        }
        else if (single_node((Node *) clause))
-       {
                return ((List *) clause);
-       }
        else if (and_clause((Node *) clause))
        {
                List       *andclause =
@@ -609,9 +593,7 @@ replace_result_clause(Node *clause,
                ((Var *) clause)->varattno = subplanVar->resdom->resno;
        }
        else if (IsA(clause, Aggreg))
-       {
                replace_result_clause(((Aggreg *) clause)->target, subplanTargetList);
-       }
        else if (is_funcclause(clause))
        {
                List       *subExpr;
@@ -622,9 +604,7 @@ replace_result_clause(Node *clause,
                 */
                subExpr = ((Expr *) clause)->args;
                foreach(t, subExpr)
-               {
                        replace_result_clause(lfirst(t), subplanTargetList);
-               }
        }
        else if (IsA(clause, ArrayRef))
        {
@@ -635,13 +615,9 @@ replace_result_clause(Node *clause,
                 * expression and its index expression...
                 */
                foreach(t, aref->refupperindexpr)
-               {
                        replace_result_clause(lfirst(t), subplanTargetList);
-               }
                foreach(t, aref->reflowerindexpr)
-               {
                        replace_result_clause(lfirst(t), subplanTargetList);
-               }
                replace_result_clause(aref->refexpr,
                                                          subplanTargetList);
                replace_result_clause(aref->refassgnexpr,
@@ -687,18 +663,14 @@ OperandIsInner(Node *opnd, int inner_relid)
         */
        if (IsA(opnd, Var) &&
                (inner_relid == ((Var *) opnd)->varno))
-       {
                return true;
-       }
        if (is_funcclause(opnd))
        {
                List       *firstArg = lfirst(((Expr *) opnd)->args);
 
                if (IsA(firstArg, Var) &&
                        (inner_relid == ((Var *) firstArg)->varno))
-               {
                        return true;
-               }
        }
        return false;
 }
@@ -864,9 +836,7 @@ del_agg_clause(Node *clause)
        List       *t;
 
        if (IsA(clause, Var))
-       {
                return clause;
-       }
        else if (is_funcclause(clause))
        {
 
@@ -875,9 +845,7 @@ del_agg_clause(Node *clause)
                 * arguments...
                 */
                foreach(t, ((Expr *) clause)->args)
-               {
                        lfirst(t) = del_agg_clause(lfirst(t));
-               }
        }
        else if (IsA(clause, Aggreg))
        {
@@ -895,13 +863,9 @@ del_agg_clause(Node *clause)
                 * expression and its index expression...
                 */
                foreach(t, aref->refupperindexpr)
-               {
                        lfirst(t) = del_agg_clause(lfirst(t));
-               }
                foreach(t, aref->reflowerindexpr)
-               {
                        lfirst(t) = del_agg_clause(lfirst(t));
-               }
                aref->refexpr = del_agg_clause(aref->refexpr);
                aref->refassgnexpr = del_agg_clause(aref->refassgnexpr);
        }
@@ -921,9 +885,7 @@ del_agg_clause(Node *clause)
                        right = del_agg_clause(right);
        }
        else if (IsA(clause, Param) ||IsA(clause, Const))
-       {
                return clause;
-       }
        else
        {
 
index 11e466ce5ef8c1cdcc822c669c1551a57996cb79..559b28bbd7487751893618c31904c1cf334669f6 100644 (file)
@@ -92,9 +92,7 @@ _replace_var(Var *var)
        }
 
        if ((i = lfirsti(vpe)) < 0) /* parameter is not assigned */
-       {
                i = _new_param(var, PlannerQueryLevel - var->varlevelsup);
-       }
 
        retval = makeNode(Param);
        retval->paramkind = PARAM_EXEC;
index b6443b8a094a3ecf8f4341fa3243d9e384d8382b..7bb288f9566133e537ac643f649a02d9be4d9bc9 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepqual.c,v 1.8 1998/02/26 04:32:57 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepqual.c,v 1.9 1998/06/15 19:28:46 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -129,13 +129,9 @@ pull_args(Expr *qual)
                return (make_orclause(pull_ors(t_list)));
        }
        else if (not_clause((Node *) qual))
-       {
                return (make_notclause(pull_args(get_notclausearg(qual))));
-       }
        else
-       {
                return (qual);
-       }
 }
 
 /*
@@ -159,9 +155,7 @@ pull_ors(List *orlist)
                                                           copyObject((Node *) lnext(orlist)))));
        }
        else
-       {
                return (lcons(lfirst(orlist), pull_ors(lnext(orlist))));
-       }
 }
 
 /*
@@ -185,9 +179,7 @@ pull_ands(List *andlist)
                                                                copyObject((Node *) lnext(andlist)))));
        }
        else
-       {
                return (lcons(lfirst(andlist), pull_ands(lnext(andlist))));
-       }
 }
 
 /*
@@ -219,9 +211,7 @@ find_nots(Expr *qual)
                List       *t_list = NIL;
 
                foreach(temp, qual->args)
-               {
                        t_list = lappend(t_list, find_nots(lfirst(temp)));
-               }
 
                return (make_andclause(t_list));
        }
@@ -231,9 +221,7 @@ find_nots(Expr *qual)
                List       *t_list = NIL;
 
                foreach(temp, qual->args)
-               {
                        t_list = lappend(t_list, find_nots(lfirst(temp)));
-               }
                return (make_orclause(t_list));
        }
        else if (not_clause((Node *) qual))
@@ -277,9 +265,7 @@ push_nots(Expr *qual)
                                (make_opclause(op, get_leftop(qual), get_rightop(qual)));
                }
                else
-               {
                        return (make_notclause(qual));
-               }
        }
        else if (and_clause((Node *) qual))
        {
@@ -293,9 +279,7 @@ push_nots(Expr *qual)
                List       *t_list = NIL;
 
                foreach(temp, qual->args)
-               {
                        t_list = lappend(t_list, push_nots(lfirst(temp)));
-               }
                return (make_orclause(t_list));
        }
        else if (or_clause((Node *) qual))
@@ -304,9 +288,7 @@ push_nots(Expr *qual)
                List       *t_list = NIL;
 
                foreach(temp, qual->args)
-               {
                        t_list = lappend(t_list, push_nots(lfirst(temp)));
-               }
                return (make_andclause(t_list));
        }
        else if (not_clause((Node *) qual))
@@ -357,9 +339,7 @@ normalize(Expr *qual)
                List       *t_list = NIL;
 
                foreach(temp, qual->args)
-               {
                        t_list = lappend(t_list, normalize(lfirst(temp)));
-               }
                return (make_andclause(t_list));
        }
        else if (or_clause((Node *) qual))
@@ -370,9 +350,7 @@ normalize(Expr *qual)
                bool            has_andclause = FALSE;
 
                foreach(temp, qual->args)
-               {
                        orlist = lappend(orlist, normalize(lfirst(temp)));
-               }
                foreach(temp, orlist)
                {
                        if (and_clause(lfirst(temp)))
@@ -427,9 +405,7 @@ or_normalize(List *orlist)
                                                                lnext(new_orlist))));
        }
        else
-       {
                return (orlist);
-       }
 }
 
 /*
@@ -562,13 +538,9 @@ remove_ands(Expr *qual)
                return ((List *) make_orclause((List *) t_list));
        }
        else if (not_clause((Node *) qual))
-       {
                return ((List *) make_notclause((Expr *) remove_ands((Expr *) get_notclausearg(qual))));
-       }
        else
-       {
                return ((List *) qual);
-       }
 }
 
 /*****************************************************************************
index 5e67d26010af01132cf9f5059307fcd5d3d45bb1..3f97f7bda6cee55ebb177435bc84bd5a83aa6ba6 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/optimizer/prep/preptlist.c,v 1.10 1998/02/26 04:33:02 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/optimizer/prep/preptlist.c,v 1.11 1998/06/15 19:28:46 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -67,9 +67,7 @@ preprocess_targetlist(List *tlist,
        List       *temp = NIL;
 
        if (result_relation >= 1 && command_type != CMD_SELECT)
-       {
                relid = getrelid(result_relation, range_table);
-       }
 
        /*
         * for heap_formtuple to work, the targetlist must match the exact
@@ -171,9 +169,7 @@ expand_targetlist(List *tlist,
                return (replace_matching_resname(ntlist, tlist));
        }
        else
-       {
                return (tlist);
-       }
 
 }
 
@@ -210,9 +206,7 @@ replace_matching_resname(List *new_tlist, List *old_tlist)
                        t_list = lappend(t_list, matching_old_tl);
                }
                else
-               {
                        t_list = lappend(t_list, new_tle);
-               }
        }
 
        /*
index 5cede30f48792fb29b6caea781b70b45dff63ad1..0c09c1e82ba52d40e94da7970d3157ce6b58d702 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepunion.c,v 1.23 1998/03/31 23:30:59 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/optimizer/prep/prepunion.c,v 1.24 1998/06/15 19:28:46 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -333,9 +333,7 @@ find_all_inheritors(List *unexamined_relids,
                                                                                        new_examined_relids);
 
        if (new_unexamined_relids == NULL)
-       {
                return (new_examined_relids);
-       }
        else
        {
                return (find_all_inheritors(new_unexamined_relids,
index 17b6113be830f436bb15c5cc00e8478d17173f77..e37da74b53e8db4d3cdaddcc3d8cf5d354ef07e9 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/optimizer/util/clauses.c,v 1.16 1998/02/26 04:33:11 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/optimizer/util/clauses.c,v 1.17 1998/06/15 19:28:47 momjian Exp $
  *
  * HISTORY
  *       AUTHOR                        DATE                    MAJOR EVENT
@@ -332,13 +332,9 @@ pull_constant_clauses(List *quals, List **constantQual)
        foreach(q, quals)
        {
                if (!contain_var_clause(lfirst(q)))
-               {
                        constqual = lcons(lfirst(q), constqual);
-               }
                else
-               {
                        restqual = lcons(lfirst(q), restqual);
-               }
        }
        freeList(quals);
        *constantQual = constqual;
@@ -371,9 +367,7 @@ clause_relids_vars(Node *clause, List **relids, List **vars)
                List       *vi;
 
                if (!intMember(var->varno, varno_list))
-               {
                        varno_list = lappendi(varno_list, var->varno);
-               }
                foreach(vi, var_list)
                {
                        Var                *in_list = (Var *) lfirst(vi);
@@ -410,9 +404,7 @@ NumRelids(Node *clause)
                Var                *var = (Var *) lfirst(i);
 
                if (!intMember(var->varno, var_list))
-               {
                        var_list = lconsi(var->varno, var_list);
-               }
        }
 
        return (length(var_list));
@@ -497,14 +489,10 @@ qual_clause_p(Node *clause)
        /* How about Param-s ?  - vadim 02/03/98 */
        if (IsA(get_leftop((Expr *) clause), Var) &&
                IsA(get_rightop((Expr *) clause), Const))
-       {
                return (true);
-       }
        else if (IsA(get_rightop((Expr *) clause), Var) &&
                         IsA(get_leftop((Expr *) clause), Const))
-       {
                return (true);
-       }
        return (false);
 }
 
@@ -519,17 +507,11 @@ void
 fix_opid(Node *clause)
 {
        if (clause == NULL || single_node(clause))
-       {
                ;
-       }
        else if (or_clause(clause) || and_clause(clause))
-       {
                fix_opids(((Expr *) clause)->args);
-       }
        else if (is_funcclause(clause))
-       {
                fix_opids(((Expr *) clause)->args);
-       }
        else if (IsA(clause, ArrayRef))
        {
                ArrayRef   *aref = (ArrayRef *) clause;
@@ -540,9 +522,7 @@ fix_opid(Node *clause)
                fix_opid(aref->refassgnexpr);
        }
        else if (not_clause(clause))
-       {
                fix_opid((Node *) get_notclausearg((Expr *) clause));
-       }
        else if (is_opclause(clause))
        {
                replace_opid((Oper *) ((Expr *) clause)->oper);
@@ -550,9 +530,7 @@ fix_opid(Node *clause)
                fix_opid((Node *) get_rightop((Expr *) clause));
        }
        else if (agg_clause(clause))
-       {
                fix_opid(((Aggreg *) clause)->target);
-       }
        else if (is_subplan(clause) &&
                         ((SubPlan *) ((Expr *) clause)->oper)->sublink->subLinkType != EXISTS_SUBLINK)
        {
index 3b3c44c3be55aedbe3465e93fc62a5af26eb0e96..33a52e2c8d944b9cc0a0dbff11c70e6486f700fe 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/indexnode.c,v 1.6 1998/02/26 04:33:13 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/optimizer/util/Attic/indexnode.c,v 1.7 1998/06/15 19:28:48 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -36,13 +36,9 @@ List *
 find_relation_indices(Query *root, Rel *rel)
 {
        if (rel->indexed)
-       {
                return (find_secondary_index(root, lfirsti(rel->relids)));
-       }
        else
-       {
                return (NIL);
-       }
 }
 
 /*
index 90c03f3f8eb476a4199615454ce7cd7dfa428887..32e0f60454cd74bbf7f25191d8207bbe9e7ffd95 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/optimizer/util/joininfo.c,v 1.6 1998/02/26 04:33:18 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/optimizer/util/joininfo.c,v 1.7 1998/06/15 19:28:48 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -103,13 +103,9 @@ other_join_clause_var(Var *var, Expr *clause)
                r = (Var *) get_rightop(clause);
 
                if (var_equal(var, l))
-               {
                        retval = r;
-               }
                else if (var_equal(var, r))
-               {
                        retval = l;
-               }
        }
 
        return (retval);
index 96a5bb9a1260634a4cad510ab68ff3e46393b1f1..23917e2c9d93491ae068b78fa71bf9d7db9f74df 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/optimizer/util/pathnode.c,v 1.7 1998/02/26 04:33:20 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/optimizer/util/pathnode.c,v 1.8 1998/06/15 19:28:49 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -77,9 +77,7 @@ set_cheapest(Rel *parent_rel, List *pathlist)
                Path       *path = (Path *) lfirst(p);
 
                if (path_is_cheaper(path, cheapest_so_far))
-               {
                        cheapest_so_far = path;
-               }
        }
 
        parent_rel->cheapestpath = cheapest_so_far;
@@ -129,9 +127,7 @@ add_pathlist(Rel *parent_rel, List *unique_paths, List *new_paths)
                {                                               /* (IsA(old_path,Path)) { */
                        new_path->parent = parent_rel;
                        if (!parent_rel->pruneable)
-                       {
                                unique_paths = lcons(new_path, unique_paths);
-                       }
                        else
                                unique_paths = lcons(new_path,
                                                                         LispRemove(old_path, unique_paths));
@@ -180,16 +176,12 @@ better_path(Path *new_path, List *unique_paths, bool *noOther)
        }
 
        if (old_path == NULL)
-       {
                *noOther = true;
-       }
        else
        {
                *noOther = false;
                if (path_is_cheaper(new_path, old_path))
-               {
                        retval = old_path;
-               }
        }
 
        return (retval);
@@ -299,14 +291,10 @@ create_index_path(Query *root,
                 * if no index keys were found, we can't order the path).
                 */
                if (pathnode->path.keys == NULL)
-               {
                        pathnode->path.p_ordering.ord.sortop = NULL;
-               }
        }
        else
-       {
                pathnode->path.keys = NULL;
-       }
 
        if (is_join_scan || restriction_clauses == NULL)
        {
@@ -468,9 +456,7 @@ create_nestloop_path(Rel *joinrel,
        /* add in expensive function costs -- JMH 7/7/92 */
 #if 0
        if (XfuncMode != XFUNC_OFF)
-       {
                pathnode->path_cost += xfunc_get_path_cost((Path *) pathnode);
-       }
 #endif
        return (pathnode);
 }
index 2237d6c1b3545030cd7e911f301052afc249c39b..43477b54dacd281ab92466e36db78afe766fa016 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/optimizer/util/plancat.c,v 1.16 1998/02/26 04:33:21 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/optimizer/util/plancat.c,v 1.17 1998/06/15 19:28:49 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -282,27 +282,19 @@ index_selectivity(Oid indid,
 
        i = 0;
        foreach(xopno, opnos)
-       {
                opno_array[i++] = lfirsti(xopno);
-       }
 
        i = 0;
        foreach(xattno, attnos)
-       {
                attno_array[i++] = lfirsti(xattno);
-       }
 
        i = 0;
        foreach(value, values)
-       {
                value_array[i++] = (char *) lfirst(value);
-       }
 
        i = 0;
        foreach(flag, flags)
-       {
                flag_array[i++] = lfirsti(flag);
-       }
 
        IndexSelectivity(indid,
                                         relid,
index 2ed37d5f5c56928d55624b3dd6b5e3f5122a75f8..b151155bc1d78ac0ff78f0f6b03c317f310cef5e 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/optimizer/util/tlist.c,v 1.12 1998/02/26 04:33:22 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/optimizer/util/tlist.c,v 1.13 1998/06/15 19:28:49 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -385,9 +385,7 @@ flatten_tlist(List *tlist)
                temp_entry = lfirst(temp);
                vars = pull_var_clause((Node *) get_expr(temp_entry));
                if (vars != NULL)
-               {
                        tlist_vars = nconc(tlist_vars, vars);
-               }
        }
 
        foreach(temp, tlist_vars)
index 346e163589243bfb2c63c181ddbc09b841e16cab..7fa3281afa12e4c25e4d37f373f892712f0018a8 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/optimizer/util/var.c,v 1.11 1998/02/26 04:33:22 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/optimizer/util/var.c,v 1.12 1998/06/15 19:28:50 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -48,9 +48,7 @@ pull_varnos(Node *me)
        {
                case T_List:
                        foreach(i, (List *) me)
-                       {
                                result = nconc(result, pull_varnos(lfirst(i)));
-                       }
                        break;
                case T_ArrayRef:
                        foreach(i, ((ArrayRef *) me)->refupperindexpr)
@@ -182,9 +180,7 @@ pull_var_clause(Node *clause)
                                 pull_var_clause(lfirst(((Expr *) lfirst(temp))->args)));
        }
        else if (IsA(clause, Aggreg))
-       {
                retval = pull_var_clause(((Aggreg *) clause)->target);
-       }
        else if (IsA(clause, ArrayRef))
        {
                List       *temp;
index 919454de1af21fefcd923214b11e4889eacdf2a8..acae0a4348c2830a659b8259af16a0084606f247 100644 (file)
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/parser/Attic/gram.c,v 2.12 1998/06/13 04:27:15 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/parser/Attic/gram.c,v 2.13 1998/06/15 19:28:51 momjian Exp $
  *
  * HISTORY
  *       AUTHOR                        DATE                    MAJOR EVENT
index 083d4ee15dfd074ceef4f0807f27b6542628ac91..7c874f88454295bbd05b74340ffae0031dab0a8d 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/parser/parse_agg.c,v 1.10 1998/03/30 16:36:36 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/parser/parse_agg.c,v 1.11 1998/06/15 19:28:54 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -351,9 +351,7 @@ agg_error(char *caller, char *aggname, Oid basetypeID)
         */
 
        if (basetypeID == InvalidOid)
-       {
                elog(ERROR, "%s: aggregate '%s' for all types does not exist", caller, aggname);
-       }
        else
        {
                elog(ERROR, "%s: aggregate '%s' for '%s' does not exist", caller, aggname,
index 007983adf7ed4827aae406dcf450b91b998d3974..4f4d74c15d79b609b55074b6f8ea2d09691a09bd 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.29 1998/05/29 14:00:21 thomas Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/parser/parse_expr.c,v 1.30 1998/06/15 19:28:54 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -90,9 +90,7 @@ transformExpr(ParseState *pstate, Node *expr, int precedence)
                                        result = (Node *) make_array_ref(temp, att->indirection);
                                }
                                else
-                               {
                                        result = temp;
-                               }
                                break;
                        }
                case T_A_Const:
@@ -465,9 +463,7 @@ parser_typecast(Value *expr, TypeName *typename, int16 atttypmod)
                tp = (Type) typenameType(type_string);
        }
        else
-       {
                tp = (Type) typenameType(typename->name);
-       }
 
        len = typeLen(tp);
 
index 66453634aecf81ba65b2e1fc14806cdb36f87929..8f625e9874c14c7afbbc444fc1bb10648aaf9a4b 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.18 1998/05/29 14:00:21 thomas Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/parser/parse_func.c,v 1.19 1998/06/15 19:28:55 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -278,9 +278,7 @@ ParseFuncOrColumn(ParseState *pstate, char *funcname, List *fargs,
                                                                                                                   PointerGetDatum(funcname),
                                                                                                                   0, 0, 0)))
                         && IS_BINARY_COMPATIBLE(typeTypeId(tp), basetype))
-                       {
                                return((Node *)lfirst(fargs));
-                       }
                }
        }
 
@@ -668,13 +666,9 @@ func_select_candidate(int nargs,
                {
                        if ((input_typeids[i] != UNKNOWNOID)
                         && (current_typeids[i] == input_typeids[i]))
-                       {
                                nmatch++;
-                       }
                        else if (IS_BINARY_COMPATIBLE(current_typeids[i], input_typeids[i]))
-                       {
                                nident++;
-                       }
                }
 
                if ((nmatch + nident) == nargs)
@@ -791,9 +785,7 @@ printf("func_select_candidate- column #%d input type is %s\n",
                for (current_candidate = candidates;
                         current_candidate != NULL;
                         current_candidate = current_candidate->next)
-               {
                        ncandidates++;
-               }
        }
 
        if (ncandidates == 1)
@@ -970,9 +962,7 @@ argtype_inherit(int nargs, Oid *oid_array)
                {
                        arginh[i].self = oid_array[i];
                        if ((relid = typeidTypeRelid(oid_array[i])) != InvalidOid)
-                       {
                                arginh[i].nsupers = find_inheritors(relid, &(arginh[i].supervec));
-                       }
                        else
                        {
                                arginh[i].nsupers = 0;
@@ -1105,9 +1095,7 @@ find_inheritors(Oid relid, Oid **supervec)
 
        }
        else
-       {
                *supervec = (Oid *) NULL;
-       }
 
        return (nvisited);
 }
index 7042e4740fc2a5fc5d5bb585a46b67ef5cc8df07..d05e1adea35e2113e88257d68e1ff312ebb42e88 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/parser/parse_oper.c,v 1.12 1998/05/29 14:00:22 thomas Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/parser/parse_oper.c,v 1.13 1998/06/15 19:28:55 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -217,9 +217,7 @@ oper_select_candidate(int nargs,
                {
                        if ((input_typeids[i] != UNKNOWNOID)
                         && (current_typeids[i] == input_typeids[i]))
-                       {
                                nmatch++;
-                       }
                }
 
 #ifdef PARSEDEBUG
@@ -257,9 +255,7 @@ printf("oper_select_candidate- reject candidate as possible match\n");
        {
                if (!can_coerce_type(1, &input_typeids[0], &candidates->args[0])
                 || !can_coerce_type(1, &input_typeids[1], &candidates->args[1]))
-               {
                        ncandidates = 0;
-               }
                return ((ncandidates == 1)? candidates->args: NULL);
        }
 
@@ -283,14 +279,10 @@ printf("oper_select_candidate- reject candidate as possible match\n");
                        if (input_typeids[i] != UNKNOWNOID)
                        {
                                if (current_typeids[i] == input_typeids[i])
-                               {
                                        nmatch++;
-                               }
                                else if (IsPreferredType(current_category, current_typeids[i])
                                 && can_coerce_type(1, &input_typeids[i], &current_typeids[i]))
-                               {
                                        nmatch++;
-                               }
                        }
                }
 
@@ -348,13 +340,9 @@ printf("oper_select_candidate- unable to coerce preferred candidate\n");
        {
                if ((input_typeids[i] != UNKNOWNOID)
                 && (input_typeids[i] != InvalidOid))
-               {
                        current_type = input_typeids[i];
-               }
                else
-               {
                        unknownOids = TRUE;
-               }
        }
 
        if (unknownOids && (current_type != UNKNOWNOID))
@@ -510,14 +498,10 @@ printf("oper_exact: commutative operator found\n");
                        }
                        /* disable for now... - thomas 1998-05-14 */
                        else
-                       {
                                tup = NULL;
-                       }
                }
                if (!HeapTupleIsValid(tup) && (!noWarnings))
-               {
                        op_error(op, arg1, arg2);
-               }
        }
 
        return tup;
@@ -589,9 +573,7 @@ printf("oper_inexact: found candidate\n");
 
                }
                else
-               {
                        tup = NULL;
-               }
 
                /* Could not choose one, for whatever reason... */
                if (!HeapTupleIsValid(tup))
@@ -757,9 +739,7 @@ right_oper(char *op, Oid arg)
                                                                                  Int8GetDatum('r'));
                        }
                        else
-                       {
                                tup = NULL;
-                       }
 
                        if (!HeapTupleIsValid(tup))
                        {
@@ -846,9 +826,7 @@ op_error(char *op, Oid arg1, Oid arg2)
                                tp2 = NULL;
 
        if (typeidIsValid(arg1))
-       {
                tp1 = typeidType(arg1);
-       }
        else
        {
                elog(ERROR, "Left hand side of operator '%s' has an unknown type"
@@ -856,9 +834,7 @@ op_error(char *op, Oid arg1, Oid arg2)
        }
 
        if (typeidIsValid(arg2))
-       {
                tp2 = typeidType(arg2);
-       }
        else
        {
                elog(ERROR, "Right hand side of operator %s has an unknown type"
index 51b3fe0b0f49b7ed10362f0686ff2e1ad37b0f03..86b7474c200b941d16776287cd2087d323eceb80 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/parser/parse_target.c,v 1.15 1998/06/05 03:49:18 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/parser/parse_target.c,v 1.16 1998/06/15 19:28:55 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -164,9 +164,7 @@ transformTargetList(ParseState *pstate, List *targetlist)
                                                                lindx[i] = ((Const *) aind->lidx)->constvalue;
                                                        }
                                                        else
-                                                       {
                                                                lindx[i] = 1;
-                                                       }
                                                        if (lindx[i] > uindx[i])
                                                                elog(ERROR, "yyparse: lower index cannot be greater than upper index");
 
@@ -336,9 +334,7 @@ transformTargetList(ParseState *pstate, List *targetlist)
                }
 
                if (p_target == NIL)
-               {
                        p_target = tail_p_target = lcons(tent, NIL);
-               }
                else
                {
                        lnext(tail_p_target) = lcons(tent, NIL);
@@ -379,20 +375,14 @@ printf("parse_target: try coercing from %s to %s via text\n",
                {
                }
                else if (can_coerce_type(1, &type_id, &text_id))
-               {
                        expr = coerce_type(pstate, expr, type_id, text_id);
-               }
                else
-               {
                        expr = NULL;
-               }
        }
 #endif
 
        else
-       {
                expr = NULL;
-       }
 
        return expr;
 } /* coerce_target_expr() */
@@ -521,13 +511,9 @@ make_targetlist_expr(ParseState *pstate,
                                Oid typelem;
 
                                if (arrayRef && !(((A_Indices *) lfirst(arrayRef))->lidx))
-                               {
                                        typelem = typeidTypElem(attrtype);
-                               }
                                else
-                               {
                                        typelem = attrtype;
-                               }
 
                                expr = coerce_target_expr(pstate, expr, type_id, typelem);
 
@@ -550,9 +536,7 @@ printf("parse_target: attrtypmod is %d\n", (int4) attrtypmod);
                         * Then explicitly size for storage...
                         */
                        if (attrtypmod > 0)
-                       {
                                expr = size_target_expr(pstate, expr, attrtype, attrtypmod);
-                       }
                }
 
                if (arrayRef != NIL)
index 5b2529f6847d494ead3a91916eb63b7467cb5c06..c611c589c464101cf17ea549e59388baedb15577 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/parser/parse_type.c,v 1.10 1998/05/29 14:00:24 thomas Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/parser/parse_type.c,v 1.11 1998/06/15 19:28:56 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -79,14 +79,10 @@ typenameType(char *s)
        HeapTuple       tup;
 
        if (s == NULL)
-       {
                elog(ERROR, "type(): Null type");
-       }
 
        if (!(tup = SearchSysCacheTuple(TYPNAME, PointerGetDatum(s), 0, 0, 0)))
-       {
                elog(ERROR, "type name lookup of %s failed", s);
-       }
        return ((Type) tup);
 }
 
@@ -209,9 +205,7 @@ typeidTypElem(Oid type_id)
        if (!(typeTuple = SearchSysCacheTuple(TYPOID,
                                                                                  ObjectIdGetDatum(type_id),
                                                                                  0, 0, 0)))
-       {
                elog(ERROR, "type id lookup of %u failed", type_id);
-       }
        type = (TypeTupleForm) GETSTRUCT(typeTuple);
 
        return (type->typelem);
index 765a59c61ad86f622a68a0663a118f01c05fa96e..efd3268fe499aa07aaca92a4cd72d7d2b854a968 100644 (file)
@@ -6,7 +6,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/parser/parser.c,v 1.33 1998/02/26 04:33:37 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/parser/parser.c,v 1.34 1998/06/15 19:28:56 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -111,9 +111,7 @@ define_sets(Node *clause)
        bool            oidbyval = typeByVal(t);
 
        if (clause == NULL)
-       {
                return;
-       }
        else if (IsA(clause, LispList))
        {
                define_sets(lfirst(clause));
@@ -123,9 +121,7 @@ define_sets(Node *clause)
        {
                if (get_constisnull((Const) clause) ||
                        !get_constisset((Const) clause))
-               {
                        return;
-               }
                setoid = SetDefine(((Const *) clause)->constvalue,
                                                   typeidTypeName(((Const *) clause)->consttype));
                set_constvalue((Const) clause, setoid);
@@ -134,22 +130,16 @@ define_sets(Node *clause)
                set_constypeByVal((Const) clause, oidbyval);
        }
        else if (IsA(clause, Iter))
-       {
                define_sets(((Iter *) clause)->iterexpr);
-       }
        else if (single_node(clause))
-       {
                return;
-       }
        else if (or_clause(clause) || and_clause(clause))
        {
                List       *temp;
 
                /* mapcan */
                foreach(temp, ((Expr *) clause)->args)
-               {
                        define_sets(lfirst(temp));
-               }
        }
        else if (is_funcclause(clause))
        {
@@ -157,18 +147,12 @@ define_sets(Node *clause)
 
                /* mapcan */
                foreach(temp, ((Expr *) clause)->args)
-               {
                        define_sets(lfirst(temp));
-               }
        }
        else if (IsA(clause, ArrayRef))
-       {
                define_sets(((ArrayRef *) clause)->refassgnexpr);
-       }
        else if (not_clause(clause))
-       {
                define_sets(get_notclausearg(clause));
-       }
        else if (is_opclause(clause))
        {
                define_sets(get_leftop(clause));
index eb98c8a2165f2c90b0f093249dfdfafb0173e000..dd0304b97f03012832963b3c0efaf5d3c843262d 100644 (file)
@@ -1,7 +1,7 @@
 /* A lexical scanner generated by flex */
 
 /* Scanner skeleton version:
- * $Header: /cvsroot/pgsql/src/backend/parser/Attic/scan.c,v 1.20 1998/05/09 23:27:39 thomas Exp $
+ * $Header: /cvsroot/pgsql/src/backend/parser/Attic/scan.c,v 1.21 1998/06/15 19:28:56 momjian Exp $
  */
 
 #define FLEX_SCANNER
@@ -555,7 +555,7 @@ char *yytext;
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/parser/Attic/scan.c,v 1.20 1998/05/09 23:27:39 thomas Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/parser/Attic/scan.c,v 1.21 1998/06/15 19:28:56 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
index 957dc2976773e6214692bfc00a9c90433bb87bd6..4d679731ea1f292cf890b41efd7116afee6d1c5c 100644 (file)
@@ -68,9 +68,7 @@ BSD44_derived_dlopen(const char *file, int num)
        void       *vp;
 
        if ((vp = dlopen((char *) file, num)) == (void *) NULL)
-       {
                sprintf(error_message, "dlopen (%s) failed", file);
-       }
        return (vp);
 #endif
 }
@@ -91,9 +89,7 @@ BSD44_derived_dlsym(void *handle, const char *name)
                name = buf;
        }
        if ((vp = dlsym(handle, (char *) name)) == (void *) NULL)
-       {
                sprintf(error_message, "dlsym (%s) failed", name);
-       }
        return (vp);
 #endif
 }
index f23267e5862685c6e712de2f37269dba1d6a2f24..f01c16071b5a99e38615b92f8bd8c981b9914218 100644 (file)
@@ -36,9 +36,7 @@ pg_dlopen(char *filename)
        if (!dl_initialized)
        {
                if (dld_init(dld_find_executable(pg_pathname)))
-               {
                        return NULL;
-               }
 
                /*
                 * if there are undefined symbols, we want dl to search from the
@@ -51,9 +49,7 @@ pg_dlopen(char *filename)
         * link the file, then check for undefined symbols!
         */
        if (dld_link(filename))
-       {
                return NULL;
-       }
 
        /*
         * If undefined symbols: try to link with the C and math libraries!
index 0f1517ac966ef9b4f3d18d4b98ea0faa8366966e..948faea34f46f4fa1a9e899b07d878240d608851 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/port/dynloader/hpux.c,v 1.3 1998/02/26 04:34:26 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/port/dynloader/hpux.c,v 1.4 1998/06/15 19:28:59 momjian Exp $
  *
  *     NOTES
  *             all functions are defined here -- it's impossible to trace the
@@ -38,9 +38,7 @@ pg_dlsym(void *handle, char *funcname)
        func_ptr        f;
 
        if (shl_findsym((shl_t *) & handle, funcname, TYPE_PROCEDURE, &f) == -1)
-       {
                f = (func_ptr) NULL;
-       }
        return (f);
 }
 
index 41507207d07ed869bc0a26760794b1de86bfddb9..aa13f09a19b94935d7552c2f0d60ab33ec132dc6 100644 (file)
@@ -10,7 +10,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/port/dynloader/linux.c,v 1.7 1998/02/26 04:34:27 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/port/dynloader/linux.c,v 1.8 1998/06/15 19:28:59 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -44,9 +44,7 @@ pg_dlopen(char *filename)
        if (!dl_initialized)
        {
                if (dld_init(dld_find_executable(pg_pathname)))
-               {
                        return NULL;
-               }
 
                /*
                 * if there are undefined symbols, we want dl to search from the
@@ -59,9 +57,7 @@ pg_dlopen(char *filename)
         * link the file, then check for undefined symbols!
         */
        if (dld_link(filename))
-       {
                return NULL;
-       }
 
        /*
         * If undefined symbols: try to link with the C and math libraries!
index 7d1d493c2bc908768a1fd0d958699f422334b496..9ddda044ff9b1c28b897550cc5cc5427d5e29ea2 100644 (file)
@@ -9,7 +9,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/port/dynloader/ultrix4.c,v 1.1 1998/03/10 05:23:40 scrappy Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/port/dynloader/ultrix4.c,v 1.2 1998/06/15 19:28:59 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -37,9 +37,7 @@ pg_dlopen(char *filename)
        if (!dl_initialized)
        {
                if (!dl_init(pg_pathname))
-               {
                        return NULL;
-               }
 
                /*
                 * if there are undefined symbols, we want dl to search from the
index f6a4af95b1827e1b87295c703098cec036545afc..54a62f7cff852656c02a0b843e526fb727d304c4 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: strcasecmp.c,v 1.3 1998/02/11 19:11:10 momjian Exp $ */
+/* $Id: strcasecmp.c,v 1.4 1998/06/15 19:28:57 momjian Exp $ */
 
 /*
  * Copyright (c) 1987 Regents of the University of California.
@@ -71,12 +71,8 @@ strcasecmp(char *s1, char *s2)
                u1 = (unsigned char) *s1++;
                u2 = (unsigned char) *s2++;
                if (charmap[u1] != charmap[u2])
-               {
                        return charmap[u1] - charmap[u2];
-               }
                if (u1 == '\0')
-               {
                        return 0;
-               }
        }
 }
index 9249e68e460ca46a0f5951f9a9a99bd8b7ee0125..aec207e52881f5eddf7858028b42e9a9add8169d 100644 (file)
@@ -10,7 +10,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.87 1998/06/09 17:36:28 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.88 1998/06/15 19:29:00 momjian Exp $
  *
  * NOTES
  *
@@ -1067,9 +1067,7 @@ BackendStartup(Port *port)
        static char envEntry[NR_ENVIRONMENT_VBL][2 * ARGV_SIZE];
 
        for (i = 0; i < NR_ENVIRONMENT_VBL; ++i)
-       {
                MemSet(envEntry[i], 0, 2 * ARGV_SIZE);
-       }
 
        /*
         * Set up the necessary environment variables for the backend This
index 1964f2a0248e4d464931aa15988b1d03076c493a..6381d5990c90988d7f5c33b680314173685a34e1 100644 (file)
@@ -831,14 +831,10 @@ sopno             stopst;
                /* how about a word boundary? */
                if ((flagch == BOL || (lastc != OUT && !ISWORD(lastc))) &&
                        (c != OUT && ISWORD(c)))
-               {
                        flagch = BOW;
-               }
                if ((lastc != OUT && ISWORD(lastc)) &&
                        (flagch == EOL || (c != OUT && !ISWORD(c))))
-               {
                        flagch = EOW;
-               }
                if (flagch == BOW || flagch == EOW)
                {
                        st = step(m->g, startst, stopst, st, flagch, st);
@@ -927,14 +923,10 @@ sopno             stopst;
                /* how about a word boundary? */
                if ((flagch == BOL || (lastc != OUT && !ISWORD(lastc))) &&
                        (c != OUT && ISWORD(c)))
-               {
                        flagch = BOW;
-               }
                if ((lastc != OUT && ISWORD(lastc)) &&
                        (flagch == EOL || (c != OUT && !ISWORD(c))))
-               {
                        flagch = EOW;
-               }
                if (flagch == BOW || flagch == EOW)
                {
                        st = step(m->g, startst, stopst, st, flagch, st);
index a54e70ad2ed98c59a5f4b63e1093bcceb723f113..01b95427c622a606239e6bc2b54e488c05699aea 100644 (file)
@@ -1643,13 +1643,9 @@ sopno            pos;
        for (i = 1; i < NPAREN; i++)
        {
                if (p->pbegin[i] >= pos)
-               {
                        p->pbegin[i]++;
-               }
                if (p->pend[i] >= pos)
-               {
                        p->pend[i]++;
-               }
        }
 
        memmove((char *) &p->strip[pos + 1], (char *) &p->strip[pos],
index ac21bed84039d012111aec187c93ebb48ed67c4e..04698be13e3fac70f11d2a65f2d7e0273e8aec30 100644 (file)
@@ -6,7 +6,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/rewrite/Attic/locks.c,v 1.9 1998/02/26 04:35:15 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/rewrite/Attic/locks.c,v 1.10 1998/06/15 19:29:06 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -137,9 +137,7 @@ matchLocks(CmdType event,
        if (parsetree->commandType != CMD_SELECT)
        {
                if (parsetree->resultRelation != varno)
-               {
                        return (NULL);
-               }
        }
 
        nlocks = rulelocks->numLocks;
@@ -154,9 +152,7 @@ matchLocks(CmdType event,
                                thisLockWasTriggered(varno,
                                                                         oneLock->attrno,
                                                                         parsetree))
-                       {
                                real_locks = lappend(real_locks, oneLock);
-                       }
                }
        }
 
index 3bce63ac663e3349d842d19e1c39ba30d31553de..cb1bbd5bcf17470d0a5dadc2b8eec98af270888d 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteDefine.c,v 1.15 1998/06/04 17:26:44 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteDefine.c,v 1.16 1998/06/15 19:29:06 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -96,9 +96,7 @@ InsertRule(char *rulname,
 
        eventrel = heap_openr(evobj);
        if (eventrel == NULL)
-       {
                elog(ERROR, "rules cannot be defined on relations not in schema");
-       }
        eventrel_oid = RelationGetRelationId(eventrel);
 
        /*
@@ -128,9 +126,7 @@ InsertRule(char *rulname,
  '%s'::bool);";
        if (strlen(template) + strlen(rulname) + strlen(actionbuf) +
                strlen(qualbuf) + 20 /* fudge fac */ > RULE_PLAN_SIZE)
-       {
                elog(ERROR, "DefineQueryRewrite: rule plan string too big.");
-       }
        sprintf(rulebuf, template,
                        rulname, evtype, eventrel_oid, evslot_index, actionbuf,
                        qualbuf, is_instead);
@@ -209,9 +205,7 @@ DefineQueryRewrite(RuleStmt *stmt)
 
        event_relation = heap_openr(event_obj->relname);
        if (event_relation == NULL)
-       {
                elog(ERROR, "virtual relations not supported yet");
-       }
        ev_relid = RelationGetRelationId(event_relation);
 
        if (eslot_string == NULL)
index 5bb24720f8f59cdcd4276516e58eb6eee97717f4..97c468a93892d96813b569aa169bf730fcc2d4b9 100644 (file)
@@ -6,7 +6,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteHandler.c,v 1.15 1998/03/30 16:36:43 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteHandler.c,v 1.16 1998/06/15 19:29:07 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -299,9 +299,7 @@ ApplyRetrieveRule(Query *parsetree,
                }
        }
        else
-       {
                nothing = TRUE;
-       }
 
        rtable = copyObject(parsetree->rtable);
        foreach(rt, rtable)
@@ -337,9 +335,7 @@ ApplyRetrieveRule(Query *parsetree,
                rtable = nconc(rtable, rule_rtable);
        }
        else
-       {
                rtable = nconc(rtable, copyObject(rule_action->rtable));
-       }
        parsetree->rtable = rtable;
 
        rule_action->rtable = rtable;
@@ -566,9 +562,7 @@ fireRules(Query *parsetree,
                         *--------------------------------------------------
                         */
                        if ((info->event == CMD_INSERT) || (info->event == CMD_UPDATE))
-                       {
                                FixNew(info, parsetree);
-                       }
 
                        /*--------------------------------------------------
                         * Step 3:
@@ -613,9 +607,7 @@ RewriteQuery(Query *parsetree, bool *instead_flag, List **qual_products)
         * only for a delete may the targetlist be NULL
         */
        if (event != CMD_DELETE)
-       {
                Assert(parsetree->targetList != NULL);
-       }
 
        result_relation = parsetree->resultRelation;
 
@@ -844,8 +836,6 @@ CheckViewPerms(Relation view, List *rtable)
 
                aclcheck_res = pg_aclcheck(rte->relname, uname.data, ACL_RD);
                if (aclcheck_res != ACLCHECK_OK)
-               {
                        elog(ERROR, "%s: %s", rte->relname, aclcheck_error_strings[aclcheck_res]);
-               }
        }
 }
index 8c9bc3412a4faceef0662fca7606e2f46f442397..0c124a36389ed05040585447a53e30759d4b311b 100644 (file)
@@ -6,7 +6,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteManip.c,v 1.13 1998/02/26 04:35:17 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteManip.c,v 1.14 1998/06/15 19:29:07 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -75,9 +75,7 @@ OffsetVarNodes(Node *node, int offset)
                                List       *l;
 
                                foreach(l, (List *) node)
-                               {
                                        OffsetVarNodes(lfirst(l), offset);
-                               }
                        }
                        break;
                default:
@@ -222,9 +220,7 @@ FindMatchingNew(List *tlist, int attno)
                TargetEntry *tle = lfirst(i);
 
                if (tle->resdom->resno == attno)
-               {
                        return (tle->expr);
-               }
        }
        return NULL;
 }
@@ -288,14 +284,10 @@ ResolveNew(RewriteInfo *info, List *targetlist, Node **nodePtr,
                                                        ((Var *) node)->varnoold = info->current_varno;
                                                }
                                                else
-                                               {
                                                        *nodePtr = make_null(((Var *) node)->vartype);
-                                               }
                                        }
                                        else
-                                       {
                                                *nodePtr = n;
-                                       }
                                }
                                break;
                        }
index ced98f59dcb90c99848af4534df0716afd874a05..964e50f702084fcbba1d92146289bd762ed85488 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteSupport.c,v 1.20 1998/04/27 04:06:26 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/rewrite/rewriteSupport.c,v 1.21 1998/06/15 19:29:08 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -69,9 +69,7 @@ RuleIdGetActionInfo(Oid ruleoid, bool *instead_flag, Query **parseTrees)
                                                                   ruleTupdesc, &instead_is_null);
 
        if (action_is_null || instead_is_null)
-       {
                elog(ERROR, "internal error: rewrite rule not properly set up");
-       }
 
        ruleaction = textout((struct varlena *) ruleaction);
        rule_evqual_string = textout((struct varlena *) rule_evqual_string);
index fbbf52ce3813d62e332c921d1c46abe3770e2cab..6006e36c503ec9cd3ee1fa7b4e3cc5059d588546 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/storage/buffer/buf_table.c,v 1.10 1998/01/07 21:04:47 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/storage/buffer/buf_table.c,v 1.11 1998/06/15 19:29:09 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -91,9 +91,7 @@ BufTableLookup(BufferTag *tagPtr)
                return (NULL);
        }
        if (!found)
-       {
                return (NULL);
-       }
        return (&(BufferDescriptors[result->id]));
 }
 
@@ -111,9 +109,7 @@ BufTableDelete(BufferDesc *buf)
         * BM_DELETED keeps us from removing buffer twice.
         */
        if (buf->flags & BM_DELETED)
-       {
                return (TRUE);
-       }
 
        buf->flags |= BM_DELETED;
 
index 7ab6019f999266c8f083daf5245f75b60a2231a7..324545cf959457e564b13e78eddea6ab006354bf 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.37 1998/04/24 14:42:16 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/storage/buffer/bufmgr.c,v 1.38 1998/06/15 19:29:09 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -137,9 +137,7 @@ RelationGetBufferWithBuffer(Relation relation,
                        bufHdr = &LocalBufferDescriptors[-buffer - 1];
                        if (bufHdr->tag.relId.relId == relation->rd_id &&
                                bufHdr->tag.blockNum == blockNumber)
-                       {
                                return (buffer);
-                       }
                }
        }
        return (ReadBuffer(relation, blockNumber));
@@ -258,9 +256,7 @@ ReadBufferWithBufferLock(Relation reln,
        }
 
        if (!bufHdr)
-       {
                return (InvalidBuffer);
-       }
 
        /* if its already in the buffer pool, we're done */
        if (found)
@@ -534,9 +530,7 @@ BufferAlloc(Relation reln,
                                                 buf->tag.blockNum, buf->sb_relname);
                                }
                                else
-                               {
                                        buf->flags &= ~BM_DIRTY;
-                               }
                        }
 
                        /*
@@ -607,9 +601,7 @@ BufferAlloc(Relation reln,
                                {
                                        WaitIO(buf2, BufMgrLock);
                                        if (buf2->flags & BM_IO_ERROR)
-                                       {
                                                *foundPtr = FALSE;
-                                       }
                                }
 
                                SpinRelease(BufMgrLock);
@@ -697,9 +689,7 @@ WriteBuffer(Buffer buffer)
        BufferDesc *bufHdr;
 
        if (WriteMode == BUFFER_FLUSH_WRITE)
-       {
                return (FlushBuffer(buffer, TRUE));
-       }
        else
        {
 
@@ -852,9 +842,7 @@ FlushBuffer(Buffer buffer, bool release)
                         bufHdr->tag.blockNum, bufHdr->sb_relname);
        }
        else
-       {
                bufHdr->flags &= ~BM_DIRTY;
-       }
        if (release)
                UnpinBuffer(bufHdr);
        SpinRelease(BufMgrLock);
@@ -877,9 +865,7 @@ WriteNoReleaseBuffer(Buffer buffer)
        BufferDesc *bufHdr;
 
        if (WriteMode == BUFFER_FLUSH_WRITE)
-       {
                return (FlushBuffer(buffer, FALSE));
-       }
        else
        {
 
@@ -1205,9 +1191,7 @@ ResetBufferPool()
                if (BufferIsValid(i))
                {
                        while (PrivateRefCount[i - 1] > 0)
-                       {
                                ReleaseBuffer(i);
-                       }
                }
                LastRefCount[i - 1] = 0;
        }
@@ -1418,9 +1402,7 @@ ReleaseRelationBuffers(Relation rdesc)
                        buf = &LocalBufferDescriptors[i];
                        if ((buf->flags & BM_DIRTY) &&
                                (buf->tag.relId.relId == rdesc->rd_id))
-                       {
                                buf->flags &= ~BM_DIRTY;
-                       }
                }
                return;
        }
@@ -1472,9 +1454,7 @@ DropBuffers(Oid dbid)
        {
                buf = &BufferDescriptors[i - 1];
                if ((buf->tag.relId.dbId == dbid) && (buf->flags & BM_DIRTY))
-               {
                        buf->flags &= ~BM_DIRTY;
-               }
        }
        SpinRelease(BufMgrLock);
 }
index e24d36cb8d422ca51dc2342e5dea94790b99fc49..d5c0272a8a6c2a3c8b06f4a3cd0dd29efd197eb3 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/storage/buffer/freelist.c,v 1.10 1998/06/15 18:39:28 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/storage/buffer/freelist.c,v 1.11 1998/06/15 19:29:10 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -105,9 +105,7 @@ PinBuffer(BufferDesc *buf)
                buf->flags &= ~BM_FREE;
        }
        else
-       {
                NotInQueue(buf);
-       }
 
        b = BufferDescriptorGetBuffer(buf) - 1;
        Assert(PrivateRefCount[b] >= 0);
index 969a5e16694695c27383eb6645b9cd7cf7cc0e35..6493b947dbff93b403c8d1d1d1f28b1b3996af17 100644 (file)
@@ -6,7 +6,7 @@
  * Copyright (c) 1994, Regents of the University of California
  *
  * IDENTIFICATION
- *       $Id: fd.c,v 1.31 1998/04/05 21:04:27 momjian Exp $
+ *       $Id: fd.c,v 1.32 1998/06/15 19:29:11 momjian Exp $
  *
  * NOTES:
  *
@@ -533,9 +533,7 @@ FileInvalidate(File file)
 {
        Assert(file > 0);
        if (!FileIsNotOpen(file))
-       {
                LruDelete(file);
-       }
 }
 
 #endif
@@ -583,9 +581,7 @@ tryAgain:
        Insert(file);
 
        if (fileName == NULL)
-       {
                elog(ERROR, "fileNameOpenFile: NULL fname");
-       }
        vfdP->fileName = malloc(strlen(fileName) + 1);
        strcpy(vfdP->fileName, fileName);
 
@@ -709,9 +705,7 @@ FileRead(File file, char *buffer, int amount)
        FileAccess(file);
        returnCode = read(VfdCache[file].fd, buffer, amount);
        if (returnCode > 0)
-       {
                VfdCache[file].seekPos += returnCode;
-       }
 
        return returnCode;
 }
@@ -815,9 +809,7 @@ FileSync(File file)
         */
 
        if (VfdCache[file].fd < 0 || !(VfdCache[file].fdstate & FD_DIRTY))
-       {
                returnCode = 0;
-       }
        else
        {
                returnCode = fsync(VfdCache[file].fd);
index 768b144ff56bae6f3877e463655c556e7375813a..b9834c0f8d68a2e79f1be687b7c5ba33006749db 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipc.c,v 1.21 1998/05/29 17:00:10 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/storage/ipc/ipc.c,v 1.22 1998/06/15 19:29:13 momjian Exp $
  *
  * NOTES
  *
@@ -310,9 +310,7 @@ IpcSemaphoreCreate(IpcSemaphoreKey semKey,
                        exitpg(3);
                }
                for (i = 0; i < semNum; i++)
-               {
                        array[i] = semStartValue;
-               }
                semun.array = array;
                errStatus = semctl(semId, 0, SETALL, semun);
                if (errStatus == -1)
@@ -513,9 +511,7 @@ IpcMemoryCreate(IpcMemoryKey memKey, uint32 size, int permission)
                shmid = PrivateMemoryCreate(memKey, size);
        }
        else
-       {
                shmid = shmget(memKey, size, IPC_CREAT | permission);
-       }
 
        if (shmid < 0)
        {
@@ -564,9 +560,7 @@ static void
 IpcMemoryDetach(int status, char *shmaddr)
 {
        if (shmdt(shmaddr) < 0)
-       {
                elog(NOTICE, "IpcMemoryDetach: shmdt(0x%x): %m", shmaddr);
-       }
 }
 
 /****************************************************************************/
@@ -582,13 +576,9 @@ IpcMemoryAttach(IpcMemoryId memId)
        char       *memAddress;
 
        if (UsePrivateMemory)
-       {
                memAddress = (char *) PrivateMemoryAttach(memId);
-       }
        else
-       {
                memAddress = (char *) shmat(memId, 0, 0);
-       }
 
        /* if ( *memAddress == -1) { XXX ??? */
        if (memAddress == (char *) -1)
index e90d9802aeb774afefc703a918e4e33237f3cde8..e5697e5a2edcdb3f805fa5b8170af7498a7b80de 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/storage/ipc/shmem.c,v 1.19 1998/05/26 17:29:07 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/storage/ipc/shmem.c,v 1.20 1998/06/15 19:29:14 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -189,18 +189,14 @@ InitShmem(unsigned int key, unsigned int size)
         * allocator and binding table.
         */
        if (!InitSpinLocks(ShmemBootstrap, IPCKeyGetSpinLockSemaphoreKey(key)))
-       {
                return (FALSE);
-       }
 
        /*
         * We have just allocated additional space for two spinlocks. Now
         * setup the global free space count
         */
        if (ShmemBootstrap)
-       {
                *ShmemFreeStart = currFreeSpace;
-       }
 
        /* if ShmemFreeStart is NULL, then the allocator won't work */
        Assert(*ShmemFreeStart);
@@ -256,9 +252,7 @@ InitShmem(unsigned int key, unsigned int size)
 
        }
        else
-       {
                Assert(!ShmemBootstrap);
-       }
        /* now release the lock acquired in ShmemHashInit */
        SpinRelease(BindingLock);
 
@@ -303,16 +297,12 @@ ShmemAlloc(unsigned long size)
                *ShmemFreeStart += size;
        }
        else
-       {
                newSpace = NULL;
-       }
 
        SpinRelease(ShmemLock);
 
        if (!newSpace)
-       {
                elog(NOTICE, "ShmemAlloc: out of memory ");
-       }
        return (newSpace);
 }
 
@@ -420,13 +410,9 @@ ShmemPIDLookup(int pid, SHMEM_OFFSET *locationPtr)
        }
 
        if (found)
-       {
                *locationPtr = result->location;
-       }
        else
-       {
                result->location = *locationPtr;
-       }
 
        SpinRelease(BindingLock);
        return (TRUE);
@@ -473,9 +459,7 @@ ShmemPIDDestroy(int pid)
        if (found)
                return (location);
        else
-       {
                return (INVALID_OFFSET);
-       }
 }
 
 /*
index 44f7b2b6e962cdc711bb41c97f03fecfe28cce09..59732f2deb1a06b2f0c9f57fa75227b952aeed19 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/storage/ipc/sinval.c,v 1.9 1997/09/08 02:28:59 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/storage/ipc/sinval.c,v 1.10 1998/06/15 19:29:15 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -49,9 +49,7 @@ CreateSharedInvalidationState(IPCKey key)
        status = SISegmentInit(true, IPCKeyGetSIBufferMemoryBlock(key));
 
        if (status == -1)
-       {
                elog(FATAL, "CreateSharedInvalidationState: failed segment init");
-       }
 }
 
 /****************************************************************************/
@@ -73,9 +71,7 @@ AttachSharedInvalidationState(IPCKey key)
        status = SISegmentInit(false, IPCKeyGetSIBufferMemoryBlock(key));
 
        if (status == -1)
-       {
                elog(FATAL, "AttachSharedInvalidationState: failed segment init");
-       }
 }
 
 void
@@ -126,13 +122,9 @@ RegisterSharedInvalid(int cacheId,         /* XXX */
        newInvalid.hashIndex = hashIndex;
 
        if (ItemPointerIsValid(pointer))
-       {
                ItemPointerCopy(pointer, &newInvalid.pointerData);
-       }
        else
-       {
                ItemPointerSetInvalid(&newInvalid.pointerData);
-       }
 
        SpinAcquire(SInvalLock);
        if (!SISetDataEntry(shmInvalBuffer, &newInvalid))
index 6bdf5a9f521ed1e808b37c49043456f16fcd8868..391e78d38bb6d21f674486a472dc926e09378705 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/storage/ipc/sinvaladt.c,v 1.8 1997/09/08 21:47:15 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/storage/ipc/sinvaladt.c,v 1.9 1998/06/15 19:29:15 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -133,9 +133,7 @@ SIAssignBackendId(SISeg *segInOutP, BackendTag backendTag)
                         (segInOutP->procState[index].limit <
                          stateP->limit ||
                          stateP->tag < backendTag)))
-               {
                        stateP = &segInOutP->procState[index];
-               }
        }
 
        /* verify that all "procState" entries checked for matching tags */
@@ -664,9 +662,7 @@ SIReadEntryData(SISeg *segP,
        }
        /* check whether we can remove dead messages                                                    */
        if (i > MAXNUMMESSAGES)
-       {
                elog(FATAL, "SIReadEntryData: Invalid segment state");
-       }
 }
 
 /************************************************************************/
@@ -696,9 +692,7 @@ SIDelExpiredDataEntries(SISeg *segP)
                {
                        /* this  adjusts also the state limits! */
                        if (!SIDelDataEntry(segP))
-                       {
                                elog(FATAL, "SIDelExpiredDataEntries: Invalid segment state");
-                       }
                }
        }
 }
@@ -779,13 +773,9 @@ SISegmentGet(int key,                      /* the corresponding key for the segment */
        IpcMemoryId shmid;
 
        if (create)
-       {
                shmid = IpcMemoryCreate(key, size, IPCProtection);
-       }
        else
-       {
                shmid = IpcMemoryIdGet(key, size);
-       }
        return (shmid);
 }
 
index bf45092fbfa8846f006aba233e674d6673fc9349..0d6aac7fbaeb4ad99480bf3b8c1dd0f8e4edef08 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/storage/ipc/Attic/spin.c,v 1.10 1997/09/22 04:20:53 vadim Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/storage/ipc/Attic/spin.c,v 1.11 1998/06/15 19:29:16 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -157,9 +157,7 @@ SpinRelease(SPINLOCK lockid)
                S_UNLOCK(&(slckP->shlock));
        }
        else
-       {
                S_UNLOCK(&(slckP->shlock));
-       }
        S_UNLOCK(&(slckP->exlock));
        S_UNLOCK(&(slckP->locklock));
 #ifdef LOCKDEBUG
index 7dff1921d051c1afda591ab9c5d957c2c3a558ae..c3d63ac36b2cd2baa7783e69bc64cf927ac7159c 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/storage/large_object/inv_api.c,v 1.29 1998/04/27 04:06:41 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/storage/large_object/inv_api.c,v 1.30 1998/06/15 19:29:16 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -527,9 +527,7 @@ inv_write(LargeObjectDesc *obj_desc, char *buf, int nbytes)
 
                /* either append or replace a block, as required */
                if (!HeapTupleIsValid(htup))
-               {
                        tuplen = inv_wrnew(obj_desc, buf, nbytes - nwritten);
-               }
                else
                {
                        if (obj_desc->offset > obj_desc->highbyte)
@@ -734,9 +732,7 @@ inv_wrnew(LargeObjectDesc *obj_desc, char *buf, int nbytes)
                }
        }
        else
-       {
                nwritten = nbytes;
-       }
 
        /*
         * Insert a new file system block tuple, index it, and write it out.
index c841d34bb1f280fcf7d31590c66bf4ad4ecec8e7..7fc61e8285ab59b540a8b322241ed173dba044a2 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lmgr.c,v 1.11 1998/01/07 21:05:28 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lmgr.c,v 1.12 1998/06/15 19:29:19 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -119,9 +119,7 @@ RelationGetLRelId(Relation relation)
         */
        if (strcmp(RelationGetRelationName(relation)->data,
                           VariableRelationName) == 0)
-       {
                return (VariableRelationLRelId);
-       }
 
        return (linfo->lRelId);
 }
@@ -519,9 +517,7 @@ RelationUnsetLockForWrite(Relation relation)
         */
        Assert(RelationIsValid(relation));
        if (LockingDisabled())
-       {
                return;
-       }
 
        linfo = (LockInfo) relation->lockInfo;
 
@@ -598,9 +594,7 @@ RelationSetLockForTupleRead(Relation relation, ItemPointer itemPointer)
        curXact = GetCurrentTransactionId();
        if ((linfo->flags & ReadRelationLock) &&
                TransactionIdEquals(curXact, linfo->transactionIdData))
-       {
                return;
-       }
 
        /* ----------------
         * If we don't already have a tuple lock this transaction
index f97e2ebdfb84beb1ab1021c4beb33e60d8a57f1b..1ff19ce4021b17c99e2f1c7cca2bf903da1aec0b 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.26 1998/02/26 04:36:07 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/storage/lmgr/lock.c,v 1.27 1998/06/15 19:29:20 momjian Exp $
  *
  * NOTES
  *       Outside modules can create a lock table and acquire/release
@@ -383,13 +383,9 @@ LockTabRename(LockTableId tableId)
        LockTableId newTableId;
 
        if (NumTables >= MAX_TABLES)
-       {
                return (INVALID_TABLEID);
-       }
        if (AllTables[tableId] == INVALID_TABLEID)
-       {
                return (INVALID_TABLEID);
-       }
 
        /* other modules refer to the lock table by a tableId */
        newTableId = NumTables;
@@ -493,9 +489,7 @@ LockAcquire(LockTableId tableId, LOCKTAG *lockName, LOCKT lockt)
        }
 
        if (LockingIsDisabled)
-       {
                return (TRUE);
-       }
 
        LOCK_PRINT("Acquire", lockName, lockt);
        masterLock = ltable->ctl->masterLock;
@@ -606,9 +600,7 @@ LockAcquire(LockTableId tableId, LOCKTAG *lockName, LOCKT lockt)
        status = LockResolveConflicts(ltable, lock, lockt, myXid);
 
        if (status == STATUS_OK)
-       {
                GrantLock(lock, lockt);
-       }
        else if (status == STATUS_FOUND)
        {
 #ifdef USER_LOCKS
@@ -757,9 +749,7 @@ LockResolveConflicts(LOCKTAB *ltable,
        for (i = 1; i <= nLockTypes; i++, tmpMask <<= 1)
        {
                if (lock->activeHolders[i] != myHolders[i])
-               {
                        bitmask |= tmpMask;
-               }
        }
 
        /* ------------------------
@@ -873,9 +863,7 @@ LockRelease(LockTableId tableId, LOCKTAG *lockName, LOCKT lockt)
        }
 
        if (LockingIsDisabled)
-       {
                return (TRUE);
-       }
 
        LOCK_PRINT("Release", lockName, lockt);
 
@@ -997,13 +985,9 @@ LockRelease(LockTableId tableId, LOCKTAG *lockName, LOCKT lockt)
                SpinRelease(masterLock);
 #ifdef USER_LOCKS
                if ((is_user_lock) && (result))
-               {
                        elog(NOTICE, "LockRelease: you don't have a lock on this tag");
-               }
                else
-               {
                        elog(NOTICE, "LockRelease: find xid, table corrupted");
-               }
 #else
                elog(NOTICE, "LockReplace: xid table corrupted");
 #endif
@@ -1027,13 +1011,9 @@ LockRelease(LockTableId tableId, LOCKTAG *lockName, LOCKT lockt)
        {
 #ifdef USER_LOCKS
                if (result->queue.prev == INVALID_OFFSET)
-               {
                        elog(NOTICE, "LockRelease: xid.prev == INVALID_OFFSET");
-               }
                if (result->queue.next == INVALID_OFFSET)
-               {
                        elog(NOTICE, "LockRelease: xid.next == INVALID_OFFSET");
-               }
 #endif
                if (result->queue.next != INVALID_OFFSET)
                        SHMQueueDelete(&result->queue);
@@ -1165,9 +1145,7 @@ LockReleaseAll(LockTableId tableId, SHM_QUEUE *lockQueue)
        elog(NOTICE, "LockReleaseAll: tableId=%d, pid=%d", tableId, MyProcPid);
 #endif
        if (is_user_lock_table)
-       {
                tableId = 1;
-       }
 #endif
 
        Assert(tableId < NumTables);
index 2196444299f8af0570db7d721bf47ca3b10c7845..db9917f86aad542604f91cbf5760535558d67aaa 100644 (file)
@@ -12,7 +12,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/storage/lmgr/Attic/multi.c,v 1.11 1998/01/23 19:53:40 scrappy Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/storage/lmgr/Attic/multi.c,v 1.12 1998/06/15 19:29:21 momjian Exp $
  *
  * NOTES:
  *      (1) The lock.c module assumes that the caller here is doing
@@ -99,9 +99,7 @@ InitMultiLevelLockm()
        tableId = LockTabInit("LockTable", MultiConflicts, MultiPrios, 5);
        MultiTableId = tableId;
        if (!(MultiTableId))
-       {
                elog(ERROR, "InitMultiLockm: couldnt initialize lock table");
-       }
        /* -----------------------
         * No short term lock table for now.  -Jeff 15 July 1991
         *
@@ -434,9 +432,7 @@ MultiRelease(LockTableId tableId,
                        }
                        status = LockRelease(tableId, tmpTag, locks[i]);
                        if (!status)
-                       {
                                elog(ERROR, "MultiRelease: couldn't release after error");
-                       }
                }
        }
        /* shouldn't reach here */
index be91266cf6fff3c752867248263563491d858e16..31d43723805716823cf228fe91899878cea432b1 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.34 1998/02/26 04:36:12 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.35 1998/06/15 19:29:21 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -46,7 +46,7 @@
  *             This is so that we can support more backends. (system-wide semaphore
  *             sets run out pretty fast.)                                -ay 4/95
  *
- * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.34 1998/02/26 04:36:12 momjian Exp $
+ * $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.35 1998/06/15 19:29:21 momjian Exp $
  */
 #include <sys/time.h>
 #include <unistd.h>
@@ -239,9 +239,7 @@ InitProcess(IPCKey key)
                MyProc->sem.semKey = semKey;
        }
        else
-       {
                MyProc->sem.semId = -1;
-       }
 
        /* ----------------------
         * Release the lock.
@@ -271,9 +269,7 @@ InitProcess(IPCKey key)
         */
        location = MAKE_OFFSET(MyProc);
        if ((!ShmemPIDLookup(MyProcPid, &location)) || (location != MAKE_OFFSET(MyProc)))
-       {
                elog(FATAL, "InitProc: ShmemPID table broken");
-       }
 
        MyProc->errType = NO_ERROR;
        SHMQueueElemInit(&(MyProc->links));
@@ -353,12 +349,9 @@ ProcKill(int exitStatus, int pid)
 
        proc = (PROC *) MAKE_PTR(location);
 
-       if (proc != MyProc)
-       {
-               Assert(pid != MyProcPid);
-       }
-       else
-               MyProc = NULL;
+       Assert(proc == MyProc || pid != MyProcPid);
+
+       MyProc = NULL;
 
        /* ---------------
         * Assume one lock table.
@@ -408,13 +401,9 @@ ProcQueueAlloc(char *name)
        ShmemInitStruct(name, (unsigned) sizeof(PROC_QUEUE), &found);
 
        if (!queue)
-       {
                return (NULL);
-       }
        if (!found)
-       {
                ProcQueueInit(queue);
-       }
        return (queue);
 }
 
index 13fdbf11c7f68d2fd0f2a933bb2e8758b6e7ae8f..e330cc05973b3b94e3644b918d7b435f937d1e2f 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/storage/page/bufpage.c,v 1.17 1998/04/24 14:42:27 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/storage/page/bufpage.c,v 1.18 1998/06/15 19:29:21 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -161,9 +161,7 @@ PageAddItem(Page page,
        upper = ((PageHeader) page)->pd_upper - alignedSize;
 
        if (lower > upper)
-       {
                return (InvalidOffsetNumber);
-       }
 
        itemId = &((PageHeader) page)->pd_linp[offsetNumber - 1];
        (*itemId).lp_off = upper;
@@ -342,9 +340,7 @@ PageGetFreeSpace(Page page)
        space = ((PageHeader) page)->pd_upper - ((PageHeader) page)->pd_lower;
 
        if (space < sizeof(ItemIdData))
-       {
                return (0);
-       }
        space -= sizeof(ItemIdData);/* XXX not always true */
 
        return (space);
@@ -464,8 +460,6 @@ PageIndexTupleDeleteAdjustLinePointers(PageHeader phdr,
        for (i = PageGetMaxOffsetNumber((Page) phdr) - 1; i >= 0; i--)
        {
                if (phdr->pd_linp[i].lp_off <= offset)
-               {
                        phdr->pd_linp[i].lp_off += size;
-               }
        }
 }
index 8f3611e268b913c67a4ca51f58c31880eefcc9b8..2545523850d3864db4bbbd86486b3863d8023a37 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/storage/smgr/md.c,v 1.30 1998/03/20 04:22:54 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/storage/smgr/md.c,v 1.31 1998/06/15 19:29:23 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -227,9 +227,7 @@ mdunlink(Relation reln)
 #else
        v = &Md_fdvec[fd];
        if (v != (MdfdVec *) NULL)
-       {
                FileUnlink(v->mdfd_vfd);
-       }
 #endif
        MemoryContextSwitchTo(oldcxt);
 
@@ -416,21 +414,15 @@ mdread(Relation reln, BlockNumber blocknum, char *buffer)
 #endif
 
        if (FileSeek(v->mdfd_vfd, seekpos, SEEK_SET) != seekpos)
-       {
                return (SM_FAIL);
-       }
 
        status = SM_SUCCESS;
        if ((nbytes = FileRead(v->mdfd_vfd, buffer, BLCKSZ)) != BLCKSZ)
        {
                if (nbytes == 0)
-               {
                        MemSet(buffer, 0, BLCKSZ);
-               }
                else
-               {
                        status = SM_FAIL;
-               }
        }
 
        return (status);
@@ -461,9 +453,7 @@ mdwrite(Relation reln, BlockNumber blocknum, char *buffer)
 #endif
 
        if (FileSeek(v->mdfd_vfd, seekpos, SEEK_SET) != seekpos)
-       {
                return (SM_FAIL);
-       }
 
        status = SM_SUCCESS;
        if (FileWrite(v->mdfd_vfd, buffer, BLCKSZ) != BLCKSZ)
@@ -500,9 +490,7 @@ mdflush(Relation reln, BlockNumber blocknum, char *buffer)
 #endif
 
        if (FileSeek(v->mdfd_vfd, seekpos, SEEK_SET) != seekpos)
-       {
                return (SM_FAIL);
-       }
 
        /* write and sync the block */
        status = SM_SUCCESS;
@@ -705,9 +693,7 @@ mdnblocks(Relation reln)
                        v = v->mdfd_chain;
                }
                else
-               {
                        return ((segno * RELSEG_SIZE) + nblocks);
-               }
        }
 #else
        return (_mdnblocks(v->mdfd_vfd, BLCKSZ));
@@ -805,9 +791,7 @@ mdabort()
                v = &Md_fdvec[i];
                if (v != (MdfdVec *) NULL)
 #endif
-               {
                        v->mdfd_flags &= ~MDFD_DIRTY;
-               }
        }
 
        return (SM_SUCCESS);
index 7ec50debf8a2d95b6e8add2e71c300641700012f..3110c9afdd4e89270334a0b280999a6fed3343bb 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/tcop/fastpath.c,v 1.17 1998/05/06 23:50:10 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/tcop/fastpath.c,v 1.18 1998/06/15 19:29:26 momjian Exp $
  *
  * NOTES
  *       This cruft is the server side of PQfn.
@@ -290,9 +290,7 @@ HandleFunctionRequest()
         */
        fip = &last_fp;
        if (!valid_fp_info(fid, fip))
-       {
                update_fp_info(fid, fip);
-       }
 
        if (fip->nargs != nargs)
        {
@@ -308,9 +306,7 @@ HandleFunctionRequest()
        for (i = 0; i < 8; ++i)
        {
                if (i >= nargs)
-               {
                        arg[i] = (char *) NULL;
-               }
                else
                {
                        argsize = pq_getint(4);
@@ -328,9 +324,7 @@ HandleFunctionRequest()
                                        if (!(p = palloc(argsize + VARHDRSZ + 1)))      /* Added +1 to solve
                                                                                                                                 * memory leak - Peter
                                                                                                                                 * 98 Jan 6 */
-                                       {
                                                elog(ERROR, "HandleFunctionRequest: palloc failed");
-                                       }
                                        VARSIZE(p) = argsize + VARHDRSZ;
                                        pq_getnchar(VARDATA(p), 0, argsize);
                                }
@@ -338,9 +332,7 @@ HandleFunctionRequest()
                                {                               /* ... fixed */
                                        /* XXX cross our fingers and trust "argsize" */
                                        if (!(p = palloc(argsize + 1)))
-                                       {
                                                elog(ERROR, "HandleFunctionRequest: palloc failed");
-                                       }
                                        pq_getnchar(p, 0, argsize);
                                }
                                palloced |= (1 << i);
index e0d8599465b7fb76d1eb6a6f0c23f99b98ee6e3e..9670f3264046fb6d7c6893ae6b577c4958eacc6f 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.75 1998/06/09 17:13:04 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.76 1998/06/15 19:29:27 momjian Exp $
  *
  * NOTES
  *       this is the "main" module of the postgres backend and
@@ -565,9 +565,7 @@ pg_parse_and_plan(char *query_string,       /* string to execute */
                 * function executor will crash.  DZ - 30-8-1996
                 */
                else
-               {
                        plan_list = lappend(plan_list, NULL);
-               }
 #endif
        }
 
@@ -1177,9 +1175,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
                exitpg(1);
        }
        else if (argc - optind == 1)
-       {
                DBName = argv[optind];
-       }
        else if ((DBName = userName) == NULL)
        {
                fprintf(stderr, "%s: USER undefined and no database specified\n",
@@ -1270,9 +1266,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
 
        /* initialize */
        if (!Quiet)
-       {
                puts("\tInitPostgres()..");
-       }
 
        InitPostgres(DBName);
 
@@ -1314,7 +1308,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[])
        if (!IsUnderPostmaster)
        {
                puts("\nPOSTGRES backend interactive interface");
-               puts("$Revision: 1.75 $ $Date: 1998/06/09 17:13:04 $");
+               puts("$Revision: 1.76 $ $Date: 1998/06/15 19:29:27 $");
        }
 
        /* ----------------
index 83ec8c9fd1fd5238d34d8ecf2d0ad2927fb354b3..f34c56f4130abdb62f1f7f47b230536a1f556b51 100644 (file)
@@ -9,7 +9,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.40 1998/06/15 18:39:29 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/tcop/utility.c,v 1.41 1998/06/15 19:29:27 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -367,9 +367,7 @@ ProcessUtility(Node *parsetree,
                                                                           stmt->definition);           /* rest */
                                                break;
                                        case TYPE_P:
-                                               {
                                                        DefineType(stmt->defname, stmt->definition);
-                                               }
                                                break;
                                        case AGGREGATE:
                                                DefineAggregate(stmt->defname,  /* aggregate name */
@@ -479,9 +477,7 @@ ProcessUtility(Node *parsetree,
                                                        relationName = RewriteGetRuleEventRel(rulename);
                                                        aclcheck_result = pg_aclcheck(relationName, userName, ACL_RU);
                                                        if (aclcheck_result != ACLCHECK_OK)
-                                                       {
                                                                elog(ERROR, "%s: %s", relationName, aclcheck_error_strings[aclcheck_result]);
-                                                       }
 #endif
                                                        RemoveRewriteRule(rulename);
                                                }
@@ -553,9 +549,7 @@ ProcessUtility(Node *parsetree,
                        break;
 
                case T_VersionStmt:
-                       {
                                elog(ERROR, "CREATE VERSION is not currently implemented");
-                       }
                        break;
 
                case T_CreatedbStmt:
index d5258cb5403572bd423f11edcfc9dfa5ad8e052e..3a8ca434625742c09082fe6570eeab4f8d3358b9 100644 (file)
@@ -43,8 +43,6 @@ AppendVarray(Varray * array, void *value, CopyingFunct copy)
        copy(value, VARRAY_NTH(array->val, array->size, array->nobj));
        array->nobj++;
        if (array->nobj >= array->maxObj)
-       {
                ENLARGE_VARRAY(array, array->maxObj / 2);
-       }
        return array->nobj;
 }
index 94caf287d4067f63a41a948091c4d91f965e1511..ab2697085e9e0fb84892d0a122687e9d92dfbc6b 100644 (file)
@@ -11,7 +11,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/tioga/Attic/tgRecipe.c,v 1.8 1998/02/26 04:36:44 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/tioga/Attic/tgRecipe.c,v 1.9 1998/06/15 19:29:29 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -385,9 +385,7 @@ lookupEdges(TgRecipe * r, char *name)
        ntups = PQntuplesGroup(pbuf, 0);
 
        if (ntups == 0)
-       {
                return;
-       }
 
        fromNode_attnum = PQfnumber(pbuf, 0, "fromNode");
        fromPort_attnum = PQfnumber(pbuf, 0, "fromPort");
index aff5abb504535272ca3751d131fc7e020f6551b8..f212dfcdd7031710f1641ba5040d0e4c3f86e380 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/utils/adt/acl.c,v 1.27 1998/02/26 04:36:47 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/utils/adt/acl.c,v 1.28 1998/06/15 19:29:31 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -98,13 +98,9 @@ aclparse(char *s, AclItem *aip, unsigned *modechg)
                *s != ACL_MODECHG_EQL_CHR)
        {                                                       /* we just read a keyword, not a name */
                if (!strcmp(name, ACL_IDTYPE_GID_KEYWORD))
-               {
                        aip->ai_idtype = ACL_IDTYPE_GID;
-               }
                else if (strcmp(name, ACL_IDTYPE_UID_KEYWORD))
-               {
                        elog(ERROR, "aclparse: bad keyword, must be [group|user]");
-               }
                s = getid(s, name);             /* move s to the name beyond the keyword */
                if (name[0] == '\0')
                        elog(ERROR, "aclparse: a name must follow the [group|user] keyword");
index 7cfc425c18112b79c564c13d41ef16ccc4879d1d..3b60534278f17871eed9c583d2cfdb090aa0eadc 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.29 1998/03/30 16:47:23 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/utils/adt/arrayfuncs.c,v 1.30 1998/06/15 19:29:32 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -157,9 +157,7 @@ array_in(char *string,                      /* input array in external form */
                        ndim++;
                }
                else
-               {
                        done = true;
-               }
        }
 
        if (ndim == 0)
@@ -170,9 +168,7 @@ array_in(char *string,                      /* input array in external form */
                        for (i = 0; i < ndim; lBound[i++] = 1);
                }
                else
-               {
                        elog(ERROR, "array_in: Need to specify dimension");
-               }
        }
        else
        {
@@ -273,9 +269,7 @@ _ArrayCount(char *str, int dim[], int typdelim)
        char       *q;
 
        for (i = 0; i < MAXDIM; ++i)
-       {
                temp[i] = dim[i] = 0;
-       }
 
        if (strncmp(str, "{}", 2) == 0)
                return (0);
@@ -292,9 +286,7 @@ _ArrayCount(char *str, int dim[], int typdelim)
                                case '\\':
                                        /* skip escaped characters (\ and ") inside strings */
                                        if (scanning_string && *(q + 1))
-                                       {
                                                q++;
-                                       }
                                        break;
                                case '\0':
 
@@ -343,9 +335,7 @@ _ArrayCount(char *str, int dim[], int typdelim)
                                q++;
        }
        for (i = 0; i < ndim; ++i)
-       {
                dim[i] = temp[i];
-       }
 
        return (ndim);
 }
@@ -493,13 +483,9 @@ _ReadArrayStr(char *arrayStr,
                        if (values[i])
                        {
                                if (typalign == 'd')
-                               {
                                        *nbytes += DOUBLEALIGN(*(int32 *) values[i]);
-                               }
                                else
-                               {
                                        *nbytes += INTALIGN(*(int32 *) values[i]);
-                               }
                        }
                        else
                        {
@@ -555,9 +541,7 @@ _ReadLOArray(char *str,
                        str = _AdvanceBy1word(str, &chunkfile);
                }
                else
-               {
                        elog(ERROR, "usage: <input file> -chunk DEFAULT/<access pattern file> -invert/-native [-noreorg <chunk file>]");
-               }
        }
 
        if (inputfile == NULL)
@@ -1040,9 +1024,7 @@ array_clip(ArrayType *array,
                                                                1, isNull);
                        }
                        else
-                       {
                                _ReadArray(lowerIndx, upperIndx, len, fd, newfd, array, 1, isNull);
-                       }
                }
 #ifdef LOARRAY
                LOclose(fd);
@@ -1245,9 +1227,7 @@ array_assgn(ArrayType *array,
 
        if (!SanityCheckInput(ndim, n, dim, lb, upperIndx) ||
                !SanityCheckInput(ndim, n, dim, lb, lowerIndx))
-       {
                return ((char *) array);
-       }
 
        for (i = 0; i < n; i++)
                if (lowerIndx[i] > upperIndx[i])
@@ -1338,13 +1318,9 @@ system_cache_lookup(Oid element_type,
        *typelem = typeStruct->typelem;
        *typalign = typeStruct->typalign;
        if (input)
-       {
                *proc = typeStruct->typinput;
-       }
        else
-       {
                *proc = typeStruct->typoutput;
-       }
 }
 
 static Datum
@@ -1367,9 +1343,7 @@ _ArrayCast(char *value, bool byval, int len)
                }
        }
        else
-       {
                return (Datum) value;
-       }
        return 0;
 }
 
@@ -1400,9 +1374,7 @@ ArrayCastAndSet(char *src,
                        }
                }
                else
-               {
                        memmove(dest, src, typlen);
-               }
                inc = typlen;
        }
        else
index 90f92bd24faf906799e007d1a54dafaf988e516b..d57c362afc62df7b5114ffc5611a094e940f0edf 100644 (file)
@@ -9,7 +9,7 @@
  * workings can be found in the book "Software Solutions in C" by
  * Dale Schumacher, Academic Press, ISBN: 0-12-632360-7.
  *
- * $Header: /cvsroot/pgsql/src/backend/utils/adt/cash.c,v 1.23 1998/03/02 00:13:36 thomas Exp $
+ * $Header: /cvsroot/pgsql/src/backend/utils/adt/cash.c,v 1.24 1998/06/15 19:29:32 momjian Exp $
  */
 
 #include <stdio.h>
@@ -122,9 +122,7 @@ printf( "cashin- negative symbol; string is '%s'\n", s);
 
        }
        else if (*s == psymbol)
-       {
                s++;
-       }
 
 #ifdef CASHDEBUG
 printf( "cashin- string is '%s'\n", s);
@@ -687,9 +685,7 @@ cash_words_out(Cash *value)
                p += 6;
        }
        else
-       {
                *buf = 0;
-       }
 
        m0 = *value % 100;                      /* cents */
        m1 = (*value / 100) % 1000; /* hundreds */
index 2acf11e50bc5cc3444fd22479048b3c024a5c053..b0f38347f81960f75e276768da73bcfa34091785 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.22 1998/02/26 04:36:59 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/utils/adt/datetime.c,v 1.23 1998/06/15 19:29:33 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -175,13 +175,9 @@ int
 date_cmp(DateADT dateVal1, DateADT dateVal2)
 {
        if (dateVal1 < dateVal2)
-       {
                return -1;
-       }
        else if (dateVal1 > dateVal2)
-       {
                return 1;
-       }
        return 0;
 }      /* date_cmp() */
 
index 5fd7c1ed119e84d1cc512049aaaa398e39b3a8b2..c3c93d5eca065449c5b255e64cff89508c5ff34e 100644 (file)
@@ -6,7 +6,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/utils/adt/datum.c,v 1.9 1998/01/05 16:39:52 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/utils/adt/datum.c,v 1.10 1998/06/15 19:29:34 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -56,9 +56,7 @@ datumGetSize(Datum value, Oid type, bool byVal, Size len)
        if (byVal)
        {
                if (len <= sizeof(Datum))
-               {
                        size = len;
-               }
                else
                {
                        elog(ERROR,
@@ -116,9 +114,7 @@ datumCopy(Datum value, Oid type, bool byVal, Size len)
 
 
        if (byVal)
-       {
                res = value;
-       }
        else
        {
                if (value == 0)
@@ -131,9 +127,7 @@ datumCopy(Datum value, Oid type, bool byVal, Size len)
                 */
                s = (char *) palloc(realSize);
                if (s == NULL)
-               {
                        elog(ERROR, "datumCopy: out of memory\n");
-               }
                memmove(s, DatumGetPointer(value), realSize);
                res = (Datum) s;
        }
index f7f18b559d22d7d6a1ec2921c15a842373714a4d..89f92e2e0fc8d1d96955a5bcf424f333efda621b 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/dt.c,v 1.54 1998/06/15 18:39:37 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/dt.c,v 1.55 1998/06/15 19:29:34 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -188,9 +188,7 @@ datetime_out(DateTime *dt)
 
        }
        else
-       {
                EncodeSpecialDateTime(DT_INVALID, buf);
-       }
 
        result = palloc(strlen(buf) + 1);
 
@@ -682,9 +680,7 @@ timespan_cmp(TimeSpan *timespan1, TimeSpan *timespan2)
 
        }
        else if (TIMESPAN_IS_INVALID(*timespan2))
-       {
                return (-1);
-       }
 
        span1 = timespan1->time;
        if (timespan1->month != 0)
@@ -727,17 +723,11 @@ datetime_smaller(DateTime *datetime1, DateTime *datetime2)
                dt2 = SetDateTime(dt2);
 
        if (DATETIME_IS_INVALID(dt1))
-       {
                *result = dt2;
-       }
        else if (DATETIME_IS_INVALID(dt2))
-       {
                *result = dt1;
-       }
        else
-       {
                *result = ((dt2 < dt1) ? dt2 : dt1);
-       }
 
        return (result);
 }      /* datetime_smaller() */
@@ -764,17 +754,11 @@ datetime_larger(DateTime *datetime1, DateTime *datetime2)
                dt2 = SetDateTime(dt2);
 
        if (DATETIME_IS_INVALID(dt1))
-       {
                *result = dt2;
-       }
        else if (DATETIME_IS_INVALID(dt2))
-       {
                *result = dt1;
-       }
        else
-       {
                *result = ((dt2 > dt1) ? dt2 : dt1);
-       }
 
        return (result);
 }      /* datetime_larger() */
@@ -812,9 +796,7 @@ datetime_mi(DateTime *datetime1, DateTime *datetime2)
 
        }
        else
-       {
                result->time = JROUND(dt1 - dt2);
-       }
        result->month = 0;
 
        return (result);
@@ -894,13 +876,9 @@ datetime_pl_span(DateTime *datetime, TimeSpan *span)
                                if (tm->tm_mday > mdays[tm->tm_mon - 1])
                                {
                                        if ((tm->tm_mon == 2) && isleap(tm->tm_year))
-                                       {
                                                tm->tm_mday = (mdays[tm->tm_mon - 1] + 1);
-                                       }
                                        else
-                                       {
                                                tm->tm_mday = mdays[tm->tm_mon - 1];
-                                       }
                                }
 
 #ifdef DATEDEBUG
@@ -912,9 +890,7 @@ datetime_pl_span(DateTime *datetime, TimeSpan *span)
 
                        }
                        else
-                       {
                                DATETIME_INVALID(dt);
-                       }
                }
 
                *result = dt;
@@ -1241,15 +1217,11 @@ datetime_age(DateTime *datetime1, DateTime *datetime2)
                }
 
                if (tm2timespan(tm, fsec, result) != 0)
-               {
                        elog(ERROR, "Unable to decode datetime", NULL);
-               }
 
        }
        else
-       {
                elog(ERROR, "Unable to decode datetime", NULL);
-       }
 
        return (result);
 }      /* datetime_age() */
@@ -1676,9 +1648,7 @@ datetime_part(text *units, DateTime *datetime)
 
        type = DecodeUnits(0, lowunits, &val);
        if (type == IGNORE)
-       {
                type = DecodeSpecial(0, lowunits, &val);
-       }
 
 #ifdef DATEDEBUG
        if (type == IGNORE)
@@ -1843,9 +1813,7 @@ timespan_part(text *units, TimeSpan *timespan)
 
        type = DecodeUnits(0, lowunits, &val);
        if (type == IGNORE)
-       {
                type = DecodeSpecial(0, lowunits, &val);
-       }
 
 #ifdef DATEDEBUG
        if (type == IGNORE)
@@ -2701,9 +2669,7 @@ ParseDateTime(char *timestr, char *lowstr,
                         * day later
                         */
                        else
-                       {
                                ftype[nf] = DTK_NUMBER;
-                       }
 
                }
 
@@ -2761,9 +2727,7 @@ ParseDateTime(char *timestr, char *lowstr,
                                /* otherwise something wrong... */
                        }
                        else
-                       {
                                return -1;
-                       }
 
                        /* ignore punctuation but use as delimiter */
                }
@@ -2774,17 +2738,13 @@ ParseDateTime(char *timestr, char *lowstr,
 
                }
                else
-               {
                        return -1;
-               }
 
                /* force in a delimiter */
                *lp++ = '\0';
                nf++;
                if (nf > MAXDATEFIELDS)
-               {
                        return -1;
-               }
 #ifdef DATEDEBUG
                printf("ParseDateTime- set field[%d] to %s type %d\n", (nf - 1), field[nf - 1], ftype[nf - 1]);
 #endif
@@ -3361,9 +3321,7 @@ DecodeTime(char *str, int fmask, int *tmask, struct tm * tm, double *fsec)
                str = cp + 1;
                tm->tm_sec = strtol(str, &cp, 10);
                if (*cp == '\0')
-               {
                        *fsec = 0;
-               }
                else if (*cp == '.')
                {
                        str = cp;
@@ -3372,9 +3330,7 @@ DecodeTime(char *str, int fmask, int *tmask, struct tm * tm, double *fsec)
                                return -1;
                }
                else
-               {
                        return -1;
-               }
        }
 
        /* do a sanity check */
@@ -3498,19 +3454,13 @@ DecodeNumber(int flen, char *str, int fmask, int *tmask, struct tm * tm, double
                *tmask = DTK_M(YEAR);
                tm->tm_year = val;
                if (tm->tm_year < 70)
-               {
                        tm->tm_year += 2000;
-               }
                else if (tm->tm_year < 100)
-               {
                        tm->tm_year += 1900;
-               }
 
        }
        else
-       {
                return -1;
-       }
 
        return 0;
 }      /* DecodeNumber() */
@@ -3583,9 +3533,7 @@ DecodeNumberField(int len, char *str, int fmask, int *tmask, struct tm * tm, dou
                if (cp == (str + 4))
                        return -1;
                if (*cp == '.')
-               {
                        *fsec = strtod(cp, NULL);
-               }
                *(str + 4) = '\0';
                tm->tm_min = strtod((str + 2), &cp);
                *(str + 2) = '\0';
@@ -3593,9 +3541,7 @@ DecodeNumberField(int len, char *str, int fmask, int *tmask, struct tm * tm, dou
 
        }
        else
-       {
                return -1;
-       }
 
        return 0;
 }      /* DecodeNumberField() */
@@ -3631,9 +3577,7 @@ DecodeTimezone(char *str, int *tzp)
 
        }
        else
-       {
                min = 0;
-       }
 
        tz = (hr * 60 + min) * 60;
        if (*str == '-')
@@ -3658,9 +3602,7 @@ DecodeSpecial(int field, char *lowtoken, int *val)
 #if USE_DATE_CACHE
        if ((datecache[field] != NULL)
                && (strncmp(lowtoken, datecache[field]->token, TOKMAXLEN) == 0))
-       {
                tp = datecache[field];
-       }
        else
        {
 #endif
@@ -3942,9 +3884,7 @@ DecodeUnits(int field, char *lowtoken, int *val)
 #if USE_DATE_CACHE
        if ((deltacache[field] != NULL)
                && (strncmp(lowtoken, deltacache[field]->token, TOKMAXLEN) == 0))
-       {
                tp = deltacache[field];
-       }
        else
        {
 #endif
@@ -3962,13 +3902,9 @@ DecodeUnits(int field, char *lowtoken, int *val)
        {
                type = tp->type;
                if ((type == TZ) || (type == DTZ))
-               {
                        *val = FROMVAL(tp);
-               }
                else
-               {
                        *val = tp->value;
-               }
        }
 
        return (type);
index 77bfa4df4e196fdba806008386aa49eacced6b98..b1fc58f9fb079c05f2f91336a5f3a651fae61da1 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/filename.c,v 1.14 1998/02/26 04:37:03 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/filename.c,v 1.15 1998/06/15 19:29:34 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -111,14 +111,10 @@ filename_in(char *file)
                        ind = len + 1;
                }
                else
-               {
                        elog(ERROR, "Couldn't find %s in your environment", environment);
-               }
        }
        else
-       {
                ind = 0;
-       }
        strcat(str, file + ind);
        return (str);
 }
index 7c63f08b7c90ad85501be9bbae45263080453518..d77fef0a169fcfae43d222df48c7e95e021f5cc1 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_ops.c,v 1.32 1998/05/09 22:39:55 thomas Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_ops.c,v 1.33 1998/06/15 19:29:34 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -254,9 +254,7 @@ path_decode(int opentype, int npts, char *str, int *isopen, char **ss, Point *p)
                                s++;
                }
                else
-               {
                        return (FALSE);
-               }
        }
        *ss = s;
 
@@ -960,9 +958,7 @@ line_parallel(LINE *l1, LINE *l2)
        return (FPeq(l1->m, l2->m));
 #endif
        if (FPzero(l1->B))
-       {
                return (FPzero(l2->B));
-       }
 
        return (FPeq(l2->A, l1->A * (l2->B / l1->B)));
 }      /* line_parallel() */
@@ -977,13 +973,9 @@ line_perp(LINE *l1, LINE *l2)
                return (FPeq(l1->m / l2->m, -1.0));
 #endif
        if (FPzero(l1->A))
-       {
                return (FPzero(l2->B));
-       }
        else if (FPzero(l1->B))
-       {
                return (FPzero(l2->A));
-       }
 
        return (FPeq(((l1->A * l2->B) / (l1->B * l2->A)), -1.0));
 }      /* line_perp() */
@@ -1396,9 +1388,7 @@ path_distance(PATH *p1, PATH *p2)
                                min = tmp;
                        }
                        else
-                       {
                                pfree(tmp);
-                       }
                }
 
        return (min);
@@ -2007,9 +1997,7 @@ dist_ps(Point *pt, LSEG *lseg)
  * and through the input point
  */
        if (lseg->p[1].x == lseg->p[0].x)
-       {
                m = 0;
-       }
        else if (lseg->p[1].y == lseg->p[0].y)
        {                                                       /* slope is infinite */
                m = (double) DBL_MAX;
@@ -2140,9 +2128,7 @@ dist_sl(LSEG *lseg, LINE *line)
                        result = d2;
                }
                else
-               {
                        pfree(d2);
-               }
        }
 
        return (result);
@@ -2998,9 +2984,7 @@ make_bound_box(POLYGON *poly)
                box_fill(&(poly->boundbox), x1, x2, y1, y2);
        }
        else
-       {
                elog(ERROR, "Unable to create bounding box for empty polygon", NULL);
-       }
 }
 
 /*------------------------------------------------------------------
@@ -3717,9 +3701,7 @@ poly_center(POLYGON *poly)
 
        }
        else
-       {
                result = NULL;
-       }
 
        return (result);
 }      /* poly_center() */
@@ -3935,9 +3917,7 @@ circle_in(char *str)
                while (isspace(*cp))
                        cp++;
                if (*cp == LDELIM)
-               {
                        s = cp;
-               }
        }
 
        if (!pair_decode(s, &circle->center.x, &circle->center.y, &s))
@@ -3962,9 +3942,7 @@ circle_in(char *str)
                                s++;
                }
                else
-               {
                        elog(ERROR, "Bad circle external representation '%s'", str);
-               }
        }
 
        if (*s != '\0')
@@ -4511,9 +4489,7 @@ poly_circle(POLYGON *poly)
        circle->center.y /= poly->npts;
 
        for (i = 0; i < poly->npts; i++)
-       {
                circle->radius += point_dt(&poly->p[i], &circle->center);
-       }
        circle->radius /= poly->npts;
 
        if (FPzero(circle->radius))
@@ -4570,23 +4546,17 @@ point_inside(Point *p, int npts, Point plist[])
                y = plist[i].y - p->y;
 
                if ((cross = lseg_crossing(x, y, px, py)) == HIT_IT)
-               {
                        return 2;
-               }
                crossnum += cross;
 
                px = x;
                py = y;
        }
        if ((cross = lseg_crossing(x0, y0, px, py)) == HIT_IT)
-       {
                return 2;
-       }
        crossnum += cross;
        if (crossnum != 0)
-       {
                return 1;
-       }
        return 0;
 }      /* point_inside() */
 
index c186ea159087f4bf6a8d50311d8a58b6af3b3591..daf0f6105b98d8eebc6eec1202654a4c41ebbd58 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.42 1998/02/26 04:37:12 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/utils/adt/nabstime.c,v 1.43 1998/06/15 19:29:35 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -131,9 +131,7 @@ abstime2tm(AbsoluteTime time, int *tzp, struct tm * tm, char *tzn)
 
 #ifdef USE_POSIX_TIME
        if (tzp != NULL)
-       {
                tx = localtime((time_t *) &time);
-       }
        else
        {
                tx = gmtime((time_t *) &time);
index 69d821ad8783185d5bb8cb5d55a6f73352deb706..679dadbe45c73c41312161738f74c8a4b2103877 100644 (file)
@@ -11,7 +11,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/utils/adt/name.c,v 1.12 1998/05/29 13:31:52 thomas Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/utils/adt/name.c,v 1.13 1998/06/15 19:29:35 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -219,9 +219,7 @@ NameComputeLength(Name name)
        for (length = 0, charP = name->data;
                 length < NAMEDATALEN && *charP != '\0';
                 length++, charP++)
-       {
                ;
-       }
        return (uint32) length;
 }
 
index 66f5f83b5ee28dbad6951aa6fe5e783e0162d440..6274d813c5d4cc174751dd95281d233c592aee0e 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/not_in.c,v 1.8 1998/01/31 04:38:45 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/not_in.c,v 1.9 1998/06/15 19:29:36 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -89,9 +89,7 @@ int4notin(int16 not_in_arg, char *relation_and_attr)
 
                integer_value = DatumGetInt16(value);
                if (left_side_argument == integer_value)
-               {
                        retval = false;
-               }
        }
 
        /* close the relation */
@@ -120,9 +118,7 @@ my_varattno(Relation rd, char *a)
        for (i = 0; i < rd->rd_rel->relnatts; i++)
        {
                if (!namestrcmp(&rd->rd_att->attrs[i]->attname, a))
-               {
                        return (i + 1);
-               }
        }
        return (-1);
 }
index 6797253b9b059d4506a5276d2881d75a02bdff0a..5a60a6707929571b0fb31e4e12f9c7a907a55d44 100644 (file)
@@ -10,7 +10,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/utils/adt/numutils.c,v 1.23 1998/02/26 04:37:14 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/utils/adt/numutils.c,v 1.24 1998/06/15 19:29:36 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -236,9 +236,7 @@ ftoa(double value, char *ascii, int width, int prec1, char format)
                                /* output left of dp */
                                expon--;
                                if (*p)
-                               {
                                        *a++ = *p++;
-                               }
                                else
                                        *a++ = '0';
                        }
index 38dcfe7f9fc16bb56b2d08131c2a8f7f220cfd97..1bcb37ef740e09bb7e17c23b06ae62029e01913e 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/oidint2.c,v 1.5 1998/02/26 04:37:17 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/oidint2.c,v 1.6 1998/06/15 19:29:36 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -31,13 +31,9 @@ oidint2in(char *o)
 
        oi->oi_oid = (Oid) pg_atoi(o, sizeof(Oid), '/');
        if (*p == '\0')
-       {
                oi->oi_int2 = 0;
-       }
        else
-       {
                oi->oi_int2 = (int16) pg_atoi(++p, sizeof(int2), '\0');
-       }
 
        return (oi);
 }
index 2c45edb1ec89aad5f54aff0eef9429064d146255..90f482708bc435da67071d9378d70a1e412eebd3 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/oidint4.c,v 1.5 1998/02/26 04:37:17 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/utils/adt/Attic/oidint4.c,v 1.6 1998/06/15 19:29:36 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -30,13 +30,9 @@ oidint4in(char *o)
 
        oi->oi_oid = (Oid) pg_atoi(o, sizeof(Oid), '/');
        if (*p == '\0')
-       {
                oi->oi_int4 = 0;
-       }
        else
-       {
                oi->oi_int4 = pg_atoi(++p, sizeof(int4), '\0');
-       }
 
        return (oi);
 }
index 3324108250ac52732012101899e10b34898e8aac..d056652ed027e7f03adcd92eb3f5cc998cafb03a 100644 (file)
@@ -1,7 +1,7 @@
 /*
  *     Edmund Mergl <E.Mergl@bawue.de>
  *
- *     $Id: oracle_compat.c,v 1.13 1998/04/27 17:08:19 scrappy Exp $
+ *     $Id: oracle_compat.c,v 1.14 1998/06/15 19:29:36 momjian Exp $
  *
  */
 
@@ -54,9 +54,7 @@ lower(text *string)
        ptr_ret = VARDATA(ret);
 
        while (m--)
-       {
                *ptr_ret++ = tolower((unsigned char)*ptr++);
-       }
 
        return ret;
 }
@@ -94,9 +92,7 @@ upper(text *string)
        ptr_ret = VARDATA(ret);
 
        while (m--)
-       {
                *ptr_ret++ = toupper((unsigned char)*ptr++);
-       }
 
        return ret;
 }
@@ -141,13 +137,9 @@ initcap(text *string)
        while (m--)
        {
                if (*(ptr_ret - 1) == ' ' || *(ptr_ret - 1) == '        ')
-               {
                        *ptr_ret++ = toupper((unsigned char)*ptr++);
-               }
                else
-               {
                        *ptr_ret++ = tolower((unsigned char)*ptr++);
-               }
        }
 
        return ret;
@@ -202,9 +194,7 @@ lpad(text *string1, int4 len, text *string2)
        ptr1 = VARDATA(string1);
 
        while (n--)
-       {
                *ptr_ret++ = *ptr1++;
-       }
 
        return ret;
 }
@@ -250,9 +240,7 @@ rpad(text *string1, int4 len, text *string2)
        ptr_ret = VARDATA(ret);
 
        while (n--)
-       {
                *ptr_ret++ = *ptr1++;
-       }
 
        ptr2 = VARDATA(string2);
 
@@ -306,15 +294,11 @@ btrim(text *string, text *set)
                while (ptr2 <= end2)
                {
                        if (*ptr == *ptr2)
-                       {
                                break;
-                       }
                        ++ptr2;
                }
                if (*ptr != *ptr2)
-               {
                        break;
-               }
                ptr++;
                ptr2 = VARDATA(set);
        }
@@ -329,15 +313,11 @@ btrim(text *string, text *set)
                while (ptr2 <= end2)
                {
                        if (*end == *ptr2)
-                       {
                                break;
-                       }
                        ++ptr2;
                }
                if (*end != *ptr2)
-               {
                        break;
-               }
                --end;
                ptr2 = VARDATA(set);
        }
@@ -391,15 +371,11 @@ ltrim(text *string, text *set)
                while (ptr2 <= end2)
                {
                        if (*ptr == *ptr2)
-                       {
                                break;
-                       }
                        ++ptr2;
                }
                if (*ptr != *ptr2)
-               {
                        break;
-               }
                ptr++;
                ptr2 = VARDATA(set);
        }
@@ -455,15 +431,11 @@ rtrim(text *string, text *set)
                while (ptr2 <= end2)
                {
                        if (*ptr == *ptr2)
-                       {
                                break;
-                       }
                        ++ptr2;
                }
                if (*ptr != *ptr2)
-               {
                        break;
-               }
                --ptr;
                ptr2 = VARDATA(set);
        }
@@ -479,9 +451,7 @@ rtrim(text *string, text *set)
        ptr_ret = VARDATA(ret) + m - 1;
 
        while (m--)
-       {
                *ptr_ret-- = *ptr--;
-       }
 
        return ret;
 }
@@ -524,9 +494,7 @@ substr(text *string, int4 m, int4 n)
        ptr_ret = VARDATA(ret);
 
        while (len--)
-       {
                *ptr_ret++ = *ptr++;
-       }
 
        return ret;
 }
index 26549def6d9bdb1a3b18f52411803e19deaa73f6..abf6cfb608b1baf0a1c011e6fa3b71cc8be2af55 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/utils/adt/regexp.c,v 1.17 1998/04/26 04:07:48 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/utils/adt/regexp.c,v 1.18 1998/06/15 19:29:36 momjian Exp $
  *
  *             Alistair Crooks added the code for the regex caching
  *             agc - cached the regular expressions used - there's a good chance
@@ -97,15 +97,11 @@ RE_compile_and_execute(struct varlena * text_re, char *text, int cflags)
                for (oldest = 0, i = 1; i < rec; i++)
                {
                        if (rev[i].cre_lru < rev[oldest].cre_lru)
-                       {
                                oldest = i;
-                       }
                }
        }
        else
-       {
                oldest = rec++;
-       }
 
        /* if there was an old re, then de-allocate the space it used */
        if (rev[oldest].cre_s != (char *) NULL)
@@ -115,9 +111,7 @@ RE_compile_and_execute(struct varlena * text_re, char *text, int cflags)
                        rev[i].cre_lru =
                                (rev[i].cre_lru - rev[oldest].cre_lru) / 2;
                        if (rev[i].cre_lru > lru)
-                       {
                                lru = rev[i].cre_lru;
-                       }
                }
                pg95_regfree(&rev[oldest].cre_re);
 
index f47fc6bced85451b13d4d032e963492495305ea5..96263e9da4d970a10dcf98bdd3cbacc2bfa66a74 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/utils/adt/regproc.c,v 1.18 1998/04/26 04:07:55 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/utils/adt/regproc.c,v 1.19 1998/06/15 19:29:37 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -72,9 +72,7 @@ regprocin(char *proname)
                                                                                RelationGetTupleDescriptor(proc),
                                                                                                 &isnull);
                        if (isnull)
-                       {
                                elog(FATAL, "regprocin: null procedure %s", proname);
-                       }
                        break;
                case 0:
                        result = (RegProcedure) 0;
index 695d4b1d525e5e48b7763db3ec5d65d23bdff5b8..3326d398f7f6684cb831d9cd2eaebd9e741870c6 100644 (file)
@@ -12,7 +12,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.18 1998/02/26 04:37:21 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/utils/adt/selfuncs.c,v 1.19 1998/06/15 19:29:37 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -506,13 +506,9 @@ hashsel(Oid operatorObjectId,
                }
                ntuples = ((Form_pg_class) GETSTRUCT(atp))->reltuples;
                if (ntuples > 0)
-               {
                        resultData = 1.0 / (float64data) ntuples;
-               }
                else
-               {
                        resultData = (float64data) (1.0 / 100.0);
-               }
                result = &resultData;
 
        }
@@ -573,13 +569,9 @@ hashnpage(Oid operatorObjectId,
 
                ntuples = ((Form_pg_class) GETSTRUCT(atp))->reltuples;
                if (ntuples > 0)
-               {
                        tempData = 1.0 / (float64data) ntuples;
-               }
                else
-               {
                        tempData = (float64data) (1.0 / 100.0);
-               }
                temp = &tempData;
 
        }
index cd43dcdace9ff0cdddce58272aa6a134d6275446..863e21e2cce454b293cc22a6e5253aa410693744 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/utils/adt/varchar.c,v 1.32 1998/05/29 13:33:24 thomas Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/utils/adt/varchar.c,v 1.33 1998/06/15 19:29:38 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -98,9 +98,7 @@ bpcharin(char *s, int dummy, int16 atttypmod)
 
        /* blank pad the string if necessary */
        for (; i < len; i++)
-       {
                *r++ = ' ';
-       }
        return (result);
 }
 
@@ -186,9 +184,7 @@ printf("'\n");
 
        /* blank pad the string if necessary */
        for (; i < rlen; i++)
-       {
                *r++ = ' ';
-       }
 
        return (result);
 } /* bpchar() */
index 6475a018895d436d0e62f32d46f5edc0638c777b..46f74c41442b928372442ab44d648298ef00d35f 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/utils/adt/varlena.c,v 1.35 1998/05/29 13:33:58 thomas Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/utils/adt/varlena.c,v 1.36 1998/06/15 19:29:38 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -657,13 +657,9 @@ byteaGetBit(text *v, int32 n)
        byte = byteaGetByte(v, byteNo);
 
        if (byte & (1 << bitNo))
-       {
                return ((int32) 1);
-       }
        else
-       {
                return ((int32) 0);
-       }
 }
 
 /*-------------------------------------------------------------
@@ -729,9 +725,7 @@ byteaSetBit(text *v, int32 n, int32 newBit)
         * sanity check!
         */
        if (newBit != 0 && newBit != 1)
-       {
                elog(ERROR, "byteaSetByte: new bit must be 0 or 1");
-       }
 
        /*
         * get the byte where the bit we want is stored.
@@ -744,13 +738,9 @@ byteaSetBit(text *v, int32 n, int32 newBit)
         * calculate the new value for that byte
         */
        if (newBit == 0)
-       {
                newByte = oldByte & (~(1 << bitNo));
-       }
        else
-       {
                newByte = oldByte | (1 << bitNo);
-       }
 
        /*
         * NOTE: 'byteaSetByte' creates a copy of 'v' & sets the byte.
index 47ce6a8b6ea7af669b671e50bf21191a6ddcca9b..2a4a8605466e4299068bf6c0a14c9e5e9f983d67 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/utils/cache/catcache.c,v 1.28 1998/06/15 18:39:40 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/utils/cache/catcache.c,v 1.29 1998/06/15 19:29:38 momjian Exp $
  *
  * Notes:
  *             XXX This needs to use exception.h to handle recovery when
@@ -172,9 +172,7 @@ CatalogCacheInitializeCache(struct catcache * cache,
                if (cp)
                        relation = heap_open(cp->relationId);
                else
-               {
                        relation = heap_openr(cache->cc_relname);
-               }
 
                didopen = 1;
        }
@@ -325,9 +323,7 @@ comphash(long l, char *v)
 
        i = 0;
        while (l--)
-       {
                i += *v++;
-       }
        return (i);
 }
 
@@ -643,9 +639,7 @@ SystemCacheRelationFlushed(Oid relId)
        for (cache = Caches; PointerIsValid(cache); cache = cache->cc_next)
        {
                if (cache->relationId == relId)
-               {
                        cache->relationId = InvalidOid;
-               }
        }
 }
 
@@ -769,15 +763,11 @@ InitSysCache(char *relname,
        {
                cp->cc_key[i] = key[i];
                if (!key[i])
-               {
                        elog(FATAL, "InitSysCache: called with 0 key[%d]", i);
-               }
                if (key[i] < 0)
                {
                        if (key[i] != ObjectIdAttributeNumber)
-                       {
                                elog(FATAL, "InitSysCache: called with %d key[%d]", key[i], i);
-                       }
                        else
                        {
                                cp->cc_klen[i] = sizeof(Oid);
@@ -990,9 +980,7 @@ SearchSysCache(struct catcache * cache,
                 */
                MemoryContextSwitchTo((MemoryContext) CacheCxt);
                if (HeapTupleIsValid(ntp))
-               {
                        ntp = heap_copytuple(ntp);
-               }
        }
        else
        {
@@ -1150,9 +1138,7 @@ RelationInvalidateCatalogCacheTuple(Relation relation,
 
                /* OPT inline simplification of CatalogCacheIdInvalidate */
                if (!PointerIsValid(function))
-               {
                        function = CatalogCacheIdInvalidate;
-               }
 
                (*function) (ccp->id,
                                 CatalogCacheComputeTupleHashIndex(ccp, relation, tuple),
index 2a8df51c6a10af6392bd5a31b260fd2e03f59a91..943ec3d0a7b321dd5962e41b02d5a5e219a33a97 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/utils/cache/Attic/fcache.c,v 1.11 1998/02/26 04:37:28 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/utils/cache/Attic/fcache.c,v 1.12 1998/06/15 19:29:39 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -288,9 +288,7 @@ init_fcache(Oid foid,
                retval->nargs = retval->func.fn_nargs;
        }
        else
-       {
                retval->func.fn_addr = (func_ptr) NULL;
-       }
 
 
        return (retval);
@@ -316,7 +314,5 @@ setFcache(Node *node, Oid foid, List *argList, ExprContext *econtext)
                fnode->func_fcache = fcache;
        }
        else
-       {
                elog(ERROR, "init_fcache: node must be Oper or Func!");
-       }
 }
index 20762257e8946dcf70f44bc66271d7a860eda45e..b71215442822679f3f0a6357633b7cdb85079ab3 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/utils/cache/inval.c,v 1.10 1998/02/23 17:43:23 scrappy Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/utils/cache/inval.c,v 1.11 1998/06/15 19:29:39 momjian Exp $
  *
  * Note - this code is real crufty...
  *
@@ -140,9 +140,7 @@ LocalInvalidInvalidate(LocalInvalid invalid, void (*function) ())
                        &((InvalidationUserData *) invalid)->dataP[-1];
 
                if (PointerIsValid(function))
-               {
                        (*function) ((Pointer) &entryDataP->userData);
-               }
 
                invalid = (Pointer) entryDataP->nextP;
 
@@ -485,17 +483,11 @@ RelationInvalidateRelationCache(Relation relation,
         * ----------------
         */
        if (relationId == MyRelationRelationId)
-       {
                objectId = tuple->t_oid;
-       }
        else if (relationId == MyAttributeRelationId)
-       {
                objectId = ((AttributeTupleForm) GETSTRUCT(tuple))->attrelid;
-       }
        else if (relationId == MyAMRelationId)
-       {
                objectId = tuple->t_oid;
-       }
        else if (relationId == MyAMOPRelationId)
        {
                ;                                               /* objectId is unused */
index b56c25e94de8930ee33136e2f82993edb64a5ffa..08ee8ea2dd8ebfdcd82b5a9b3e7d2dd46b9ed711 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/utils/cache/lsyscache.c,v 1.13 1998/02/26 04:37:30 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/utils/cache/lsyscache.c,v 1.14 1998/06/15 19:29:40 momjian Exp $
  *
  * NOTES
  *       Eventually, the index information should go through here, too.
@@ -251,9 +251,7 @@ op_mergesortable(Oid opno, Oid ltype, Oid rtype, Oid *leftOp, Oid *rightOp)
                return TRUE;
        }
        else
-       {
                return FALSE;
-       }
 }
 
 /*
index 3fe7de4c32196bcbd29b5c41dc1be8f131bf5065..686cc610f2b5293fc2a11a0a0f95df7fdff68524 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.39 1998/06/15 18:39:40 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/utils/cache/relcache.c,v 1.40 1998/06/15 19:29:40 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -380,9 +380,7 @@ scan_pg_rel_seq(RelationBuildDescInfo buildinfo)
         * ----------------
         */
        if (!HeapTupleIsValid(pg_class_tuple))
-       {
                return_tuple = pg_class_tuple;
-       }
        else
        {
                /* ------------------
@@ -907,13 +905,9 @@ RelationBuildDesc(RelationBuildDescInfo buildinfo)
         * ----------------
         */
        if (relp->relhasrules)
-       {
                RelationBuildRuleLock(relation);
-       }
        else
-       {
                relation->rd_rules = NULL;
-       }
 
        /* Triggers */
        if (relp->reltriggers > 0)
@@ -926,9 +920,7 @@ RelationBuildDesc(RelationBuildDescInfo buildinfo)
         * ----------------
         */
        if (OidIsValid(relam))
-       {
                IndexedAccessMethodInitialize(relation);
-       }
 
        /* ----------------
         *      initialize the relation lock manager information
@@ -993,9 +985,7 @@ IndexedAccessMethodInitialize(Relation relation)
                support = (RegProcedure *) palloc(supportSize);
        }
        else
-       {
                support = (RegProcedure *) NULL;
-       }
 
        IndexSupportInitialize(strategy, support,
                                                   relation->rd_att->attrs[0]->attrelid,
@@ -1346,9 +1336,7 @@ RelationFlushRelation(Relation *relationPtr,
                        int                     j;
 
                        for (j = 0; j < relation->rd_rules->numLocks; j++)
-                       {
                                pfree(relation->rd_rules->rules[j]);
-                       }
                        pfree(relation->rd_rules->rules);
                        pfree(relation->rd_rules);
                }
@@ -1460,9 +1448,7 @@ RelationFlushIndexes(Relation *r,
        if (relation->rd_rel->relkind == RELKIND_INDEX &&       /* XXX style */
                (!OidIsValid(accessMethodId) ||
                 relation->rd_rel->relam == accessMethodId))
-       {
                RelationFlushRelation(&relation, false);
-       }
 }
 
 #endif
@@ -1588,9 +1574,7 @@ RelationPurgeLocalRelation(bool xactCommitted)
                                }
                        }
                        else
-                       {
                                smgrunlink(DEFAULT_SMGR, reln);
-                       }
                }
                else if (!IsBootstrapProcessingMode() && !(reln->rd_istemp))
 
index 480a913e9d93698993efdf027afdf0517859ce24..0348fa3481ac7b617ef37b0e7e3be5286f985466 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/utils/cache/syscache.c,v 1.17 1998/05/09 23:45:29 thomas Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/utils/cache/syscache.c,v 1.18 1998/06/15 19:29:40 momjian Exp $
  *
  * NOTES
  *       These routines allow the parser/planner/executor to perform
@@ -406,30 +406,22 @@ SearchSysCacheTuple(int cacheId,/* cache selection code */
                return ((HeapTuple) NULL);
        }
 
-       if (!AMI_OVERRIDE)
-       {
-               Assert(PointerIsValid(SysCache[cacheId]));
-       }
-       else
+       Assert(AMI_OVERRIDE || PointerIsValid(SysCache[cacheId]));
+
+       if (!PointerIsValid(SysCache[cacheId]))
        {
+               SysCache[cacheId] =
+                       InitSysCache(cacheinfo[cacheId].name,
+                                                cacheinfo[cacheId].indname,
+                                                cacheId,
+                                                cacheinfo[cacheId].nkeys,
+                                                cacheinfo[cacheId].key,
+                                                cacheinfo[cacheId].iScanFunc);
                if (!PointerIsValid(SysCache[cacheId]))
-               {
-                       SysCache[cacheId] =
-                               InitSysCache(cacheinfo[cacheId].name,
-                                                        cacheinfo[cacheId].indname,
-                                                        cacheId,
-                                                        cacheinfo[cacheId].nkeys,
-                                                        cacheinfo[cacheId].key,
-                                                        cacheinfo[cacheId].iScanFunc);
-                       if (!PointerIsValid(SysCache[cacheId]))
-                       {
-                               elog(ERROR,
-                                        "InitCatalogCache: Can't init cache %.16s(%d)",
-                                        cacheinfo[cacheId].name,
-                                        cacheId);
-                       }
-
-               }
+                       elog(ERROR,
+                                "InitCatalogCache: Can't init cache %.16s(%d)",
+                                cacheinfo[cacheId].name,
+                                cacheId);
        }
 
        tp = SearchSysCache(SysCache[cacheId], key1, key2, key3, key4);
@@ -559,9 +551,7 @@ SearchSysCacheGetAttribute(int cacheId,
        }
 
        if (attributeByValue)
-       {
                returnValue = (void *) attributeValue;
-       }
        else
        {
                char       *tmp;
@@ -662,9 +652,7 @@ TypeDefaultRetrieve(Oid typId)
                        returnValue = (void *) i32;
                }
                else
-               {
                        returnValue = NULL;
-               }
        }
        else
        {
index fdbae14e99b4061c9fd82ee3b955b68ca6c4ac43..88ca05a1b2f6226354ffad2ac57789a6b4a5110d 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.28 1998/05/19 18:05:50 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/utils/error/elog.c,v 1.29 1998/06/15 19:29:41 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -63,9 +63,7 @@ elog(int lev, const char *fmt,...)
 
        va_start(ap, fmt);
        if (lev == DEBUG && Debugfile < 0)
-       {
                return;
-       }
        switch (lev)
        {
                case NOIND:
index 1611cd1a966913c8cd7d5d20f2592adee7b013db..e92878019b43e7f567581e5989709ffe27e7bb4e 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/utils/fmgr/dfmgr.c,v 1.17 1998/01/31 04:38:57 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/utils/fmgr/dfmgr.c,v 1.18 1998/06/15 19:29:42 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -149,9 +149,7 @@ handle_load(char *filename, char *funcname)
                if (file_scanner == (DynamicFileList *) NULL)
                {
                        if (stat(filename, &stat_buf) == -1)
-                       {
                                elog(ERROR, "stat failed on file %s", filename);
-                       }
 
                        for (file_scanner = file_list;
                                 file_scanner != (DynamicFileList *) NULL
@@ -168,9 +166,7 @@ handle_load(char *filename, char *funcname)
                }
        }
        else
-       {
                file_scanner = (DynamicFileList *) NULL;
-       }
 
        /*
         * File not loaded yet.
@@ -202,13 +198,9 @@ handle_load(char *filename, char *funcname)
                {
                        load_error = (char *) pg_dlerror();
                        if (file_scanner == file_list)
-                       {
                                file_list = (DynamicFileList *) NULL;
-                       }
                        else
-                       {
                                file_tail->next = (DynamicFileList *) NULL;
-                       }
 
                        free((char *) file_scanner);
                        elog(ERROR, "Load of file %s failed: %s", filename, load_error);
@@ -226,9 +218,7 @@ handle_load(char *filename, char *funcname)
        retval = (func_ptr) pg_dlsym(file_scanner->handle, funcname);
 
        if (retval == (func_ptr) NULL)
-       {
                elog(ERROR, "Can't find function %s in file %s", funcname, filename);
-       }
 
        return (retval);
 }
@@ -254,9 +244,7 @@ load_file(char *filename)
        int                     done = 0;
 
        if (stat(filename, &stat_buf) == -1)
-       {
                elog(ERROR, "stat failed on file %s", filename);
-       }
 
        if (file_list != (DynamicFileList *) NULL
                && !NOT_EQUAL(stat_buf, *file_list))
@@ -272,17 +260,11 @@ load_file(char *filename)
                while (!done)
                {
                        if (file_scanner->next == (DynamicFileList *) NULL)
-                       {
                                done = 1;
-                       }
                        else if (!NOT_EQUAL(stat_buf, *(file_scanner->next)))
-                       {
                                done = 1;
-                       }
                        else
-                       {
                                file_scanner = file_scanner->next;
-                       }
                }
 
                if (file_scanner->next != (DynamicFileList *) NULL)
index 618ab6a802f03f902ef1ab649055e31562226b2d..c2a5b53aeb6571ba775140e84759c558cafc0274 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/utils/fmgr/fmgr.c,v 1.16 1998/03/07 06:03:28 thomas Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/utils/fmgr/fmgr.c,v 1.17 1998/06/15 19:29:44 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -50,9 +50,7 @@ fmgr_pl(char *arg0,...)
                {
                        va_start(pvar, arg0);
                        for (i = 1; i < fmgr_pl_finfo->fn_nargs; i++)
-                       {
                                values.data[i] = va_arg(pvar, char *);
-                       }
                        va_end(pvar);
                }
        }
@@ -91,9 +89,7 @@ fmgr_c(FmgrInfo *finfo,
         * instead.
         */
        if (finfo->fn_plhandler != NULL)
-       {
                return (*(finfo->fn_plhandler)) (finfo, values, isNull);
-       }
 
        switch (n_arguments)
        {
index 23f4f43d9bdf35d91a2956234225097c6c5b8901..07afdc3954ea53a1636e939186ef1ca923f0f51a 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/utils/hash/dynahash.c,v 1.13 1998/02/26 04:37:49 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/utils/hash/dynahash.c,v 1.14 1998/06/15 19:29:46 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -165,9 +165,7 @@ hash_create(int nelem, HASHCTL *info, int flags)
        MemSet(hashp, 0, sizeof(HTAB));
 
        if (flags & HASH_FUNCTION)
-       {
                hashp->hash = info->hash;
-       }
        else
        {
                /* default */
@@ -185,9 +183,7 @@ hash_create(int nelem, HASHCTL *info, int flags)
 
                /* hash table already exists, we're just attaching to it */
                if (flags & HASH_ATTACH)
-               {
                        return (hashp);
-               }
 
        }
        else
@@ -204,9 +200,7 @@ hash_create(int nelem, HASHCTL *info, int flags)
        {
                hashp->hctl = (HHDR *) hashp->alloc((unsigned long) sizeof(HHDR));
                if (!hashp->hctl)
-               {
                        return (0);
-               }
        }
 
        if (!hdefault(hashp))
@@ -227,9 +221,7 @@ hash_create(int nelem, HASHCTL *info, int flags)
                hctl->sshift = my_log2(info->ssize);
        }
        if (flags & HASH_FFACTOR)
-       {
                hctl->ffactor = info->ffactor;
-       }
 
        /*
         * SHM hash tables have fixed maximum size (allocate a maximal sized
@@ -251,9 +243,7 @@ hash_create(int nelem, HASHCTL *info, int flags)
                hctl->datasize = info->datasize;
        }
        if (flags & HASH_ALLOC)
-       {
                hashp->alloc = info->alloc;
-       }
 
        if (init_htab(hashp, nelem))
        {
@@ -327,9 +317,7 @@ init_htab(HTAB *hashp, int nelem)
        nsegs = 1 << my_log2(nsegs);
 
        if (nsegs > hctl->dsize)
-       {
                hctl->dsize = nsegs;
-       }
 
        /* Use two low order bits of points ???? */
 
@@ -452,9 +440,7 @@ call_hash(HTAB *hashp, char *k, int len)
 
        bucket = hash_val & hctl->high_mask;
        if (bucket > hctl->max_bucket)
-       {
                bucket = bucket & hctl->low_mask;
-       }
 
        return (bucket);
 }
@@ -534,9 +520,7 @@ hash_search(HTAB *hashp,
                        curr = GET_BUCKET(hashp, currIndex);
 
                        if (!memcmp((char *) &(curr->key), keyPtr, hctl->keysize))
-                       {
                                break;
-                       }
                        prevIndexPtr = &(curr->next);
                        currIndex = *prevIndexPtr;
 #if HASH_STATISTICS
@@ -608,9 +592,7 @@ hash_search(HTAB *hashp,
 
                /* no free elements.  allocate another chunk of buckets */
                if (!bucket_alloc(hashp))
-               {
                        return (NULL);
-               }
                currIndex = hctl->freeBucketIndex;
        }
        Assert(currIndex != INVALID_INDEX);
@@ -754,13 +736,9 @@ expand_table(HTAB *hashp)
 
                /* Allocate new segment if necessary */
                if (new_segnum >= hctl->dsize)
-               {
                        dir_realloc(hashp);
-               }
                if (!(hashp->dir[new_segnum] = seg_alloc(hashp)))
-               {
                        return (0);
-               }
                hctl->nsegs++;
        }
 
@@ -851,9 +829,7 @@ seg_alloc(HTAB *hashp)
                                                                  sizeof(SEGMENT) * hashp->hctl->ssize);
 
        if (!segp)
-       {
                return (0);
-       }
 
        MemSet((char *) segp, 0,
                   (long) sizeof(SEGMENT) * hashp->hctl->ssize);
@@ -887,9 +863,7 @@ bucket_alloc(HTAB *hashp)
                hashp->alloc((unsigned long) BUCKET_ALLOC_INCR * bucketSize);
 
        if (!tmpBucket)
-       {
                return (0);
-       }
 
        tmpIndex = MAKE_HASHOFFSET(hashp, tmpBucket);
 
index e84256d6de98021cdf31c36393e7833b309504a4..06d6c7a5ef17348ffffc2e190eb6ce89ff8c2b53 100644 (file)
@@ -6,7 +6,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/utils/init/Attic/findbe.c,v 1.9 1998/06/09 17:13:05 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/utils/init/Attic/findbe.c,v 1.10 1998/06/15 19:29:47 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -110,9 +110,7 @@ ValidateBinary(char *path)
        if (pwp)
        {
                if (pwp->pw_gid == buf.st_gid)
-               {
                        ++in_grp;
-               }
                else if (pwp->pw_name &&
                                 (gp = getgrgid(buf.st_gid)))
                {
index 27bb849a08b296dfaaf584b29de93414868ed3b1..650068d22d42c41eb65301cdea3e049b47a2f9f7 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.28 1998/05/29 17:00:21 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/utils/init/postinit.c,v 1.29 1998/06/15 19:29:49 momjian Exp $
  *
  * NOTES
  *             InitPostgres() is the function called from PostgresMain
@@ -295,9 +295,7 @@ InitCommunication()
 
        postid = getenv("POSTID");
        if (!PointerIsValid(postid))
-       {
                MyBackendTag = -1;
-       }
        else
        {
                MyBackendTag = atoi(postid);
@@ -307,9 +305,7 @@ InitCommunication()
 
        ipc_key = getenv("IPC_KEY");
        if (!PointerIsValid(ipc_key))
-       {
                key = -1;
-       }
        else
        {
                key = atoi(ipc_key);
@@ -367,9 +363,7 @@ InitCommunication()
                 * ----------------
                 */
                if (MyBackendTag == -1)
-               {
                        MyBackendTag = 1;
-               }
 
                key = PrivateIPCKey;
        }
index 7b3433b0baa12b4af19ca601db40ae0dfe3d5097..a2ab2f3ba76fa28220fff7b37937f28c48acf86b 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/utils/misc/Attic/database.c,v 1.9 1998/05/29 13:43:14 thomas Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/utils/misc/Attic/database.c,v 1.10 1998/06/15 19:29:50 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -144,9 +144,7 @@ ExpandDatabasePath(char *dbpath)
        }
        /* no path delimiter? then add the default path prefixes */
        else
-       {
                sprintf(buf, "%s%cbase%c%s", DataDir, SEP_CHAR, SEP_CHAR, dbpath);
-       }
 
        path = palloc(strlen(buf) + 1);
        strcpy(path, buf);
index db98bdc83d3443a54c13d75611508d9d760e9044..5de78307f665c1beaa242a39f1dee0cbe36207c9 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/utils/mmgr/aset.c,v 1.8 1997/09/08 20:57:46 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/utils/mmgr/aset.c,v 1.9 1998/06/15 19:29:51 momjian Exp $
  *
  * NOTE
  *       XXX This is a preliminary implementation which lacks fail-fast
@@ -130,9 +130,7 @@ AllocSetReset(AllocSet set)
        AssertArg(AllocSetIsValid(set));
 
        while (AllocPointerIsValid(pointer = AllocSetGetFirst(set)))
-       {
                AllocSetFree(set, pointer);
-       }
 }
 
 #ifdef NOT_USED
@@ -144,9 +142,7 @@ AllocSetReset_debug(char *file, int line, AllocSet set)
        AssertArg(AllocSetIsValid(set));
 
        while (AllocPointerIsValid(pointer = AllocSetGetFirst(set)))
-       {
                AllocSetFree(set, pointer);
-       }
 }
 
 #endif
@@ -189,9 +185,7 @@ AllocSetAlloc(AllocSet set, Size size)
        alloc = (AllocElem) malloc(sizeof(*alloc) + size);
 
        if (!PointerIsValid(alloc))
-       {
                elog(FATAL, "palloc failure: memory exhausted");
-       }
 
        /* add to allocation list */
        OrderedElemPushInto(&alloc->elemData, &set->setData);
@@ -298,9 +292,7 @@ AllocSetIterate(AllocSet set,
        {
 
                if (PointerIsValid(function))
-               {
                        (*function) (pointer);
-               }
                count += 1;
        }
 
@@ -319,9 +311,7 @@ AllocSetCount(AllocSet set)
        for (pointer = AllocSetGetFirst(set);
                 AllocPointerIsValid(pointer);
                 pointer = AllocPointerGetNext(pointer))
-       {
                count++;
-       }
        return count;
 }
 
@@ -346,9 +336,7 @@ AllocSetGetFirst(AllocSet set)
        alloc = (AllocElem) OrderedSetGetHead(&set->setData);
 
        if (!AllocElemIsValid(alloc))
-       {
                return (NULL);
-       }
 
        return (AllocElemGetAllocPointer(alloc));
 }
@@ -369,9 +357,7 @@ AllocPointerGetNext(AllocPointer pointer)
                OrderedElemGetSuccessor(&AllocPointerGetAllocElem(pointer)->elemData);
 
        if (!AllocElemIsValid(alloc))
-       {
                return (NULL);
-       }
 
        return (AllocElemGetAllocPointer(alloc));
 }
index 880b8cddc7239950d50cf8f6485de6993305a955..dbe9b65fb916d125ea52b82ff65acd2871bc3b69 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/utils/mmgr/mcxt.c,v 1.7 1998/02/26 04:38:21 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/utils/mmgr/mcxt.c,v 1.8 1998/06/15 19:29:52 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -151,9 +151,7 @@ EnableMemoryContext(bool on)
        AssertArg(BoolIsValid(on));
 
        if (BypassEnable(&MemoryContextEnableCount, on))
-       {
                return;
-       }
 
        processing = true;
 
@@ -188,9 +186,7 @@ EnableMemoryContext(bool on)
                                OrderedElemPop(&TopGlobalMemoryData.elemData);
                        }
                        else
-                       {
                                GlobalMemoryDestroy(context);
-                       }
                        /* what is needed for the top? */
                }
 
@@ -493,15 +489,11 @@ GlobalMemoryDump(GlobalMemory this)
 
        context = (GlobalMemory) OrderedElemGetPredecessor(&this->elemData);
        if (PointerIsValid(context))
-       {
                printf("\tpredecessor=%s\n", GlobalMemoryGetName(context));
-       }
 
        context = (GlobalMemory) OrderedElemGetSuccessor(&this->elemData);
        if (PointerIsValid(context))
-       {
                printf("\tsucessor=%s\n", GlobalMemoryGetName(context));
-       }
 
        AllocSetDump(&this->setData);           /* XXX is this right interface */
 }
index 4c76d73d36a34378e5fb860aeed5b2a3b5647af5..810964e94dd337cb608beb091811cb7b27be64bd 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/utils/mmgr/Attic/oset.c,v 1.7 1998/02/11 19:13:17 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/utils/mmgr/Attic/oset.c,v 1.8 1998/06/15 19:29:53 momjian Exp $
  *
  * NOTE
  *       XXX This is a preliminary implementation which lacks fail-fast
@@ -68,9 +68,7 @@ OrderedSetGetHead(OrderedSet set)
 
        elem = set->head;
        if (elem->next)
-       {
                return (OrderedElemGetBase(elem));
-       }
        return (NULL);
 }
 
@@ -85,9 +83,7 @@ OrderedSetGetTail(OrderedSet set)
 
        elem = set->tail;
        if (elem->prev)
-       {
                return (OrderedElemGetBase(elem));
-       }
        return (NULL);
 }
 
@@ -101,9 +97,7 @@ OrderedElemGetPredecessor(OrderedElem elem)
 {
        elem = elem->prev;
        if (elem->prev)
-       {
                return (OrderedElemGetBase(elem));
-       }
        return (NULL);
 }
 
@@ -115,9 +109,7 @@ OrderedElemGetSuccessor(OrderedElem elem)
 {
        elem = elem->next;
        if (elem->next)
-       {
                return (OrderedElemGetBase(elem));
-       }
        return (NULL);
 }
 
index e12b6f44ac9a3ea8da45e2711a6b066e65935f80..b910696ea469c73f10827918ff7be1d4e50dde0e 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/utils/mmgr/portalmem.c,v 1.11 1998/06/15 18:39:44 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/utils/mmgr/portalmem.c,v 1.12 1998/06/15 19:29:53 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -594,9 +594,7 @@ GetPortalByName(char *name)
        AssertState(PortalManagerEnabled);
 
        if (PointerIsValid(name))
-       {
                PortalHashTableLookup(name, portal);
-       }
        else
        {
                if (!PortalIsValid(BlankPortal))
index 926c464fd26a53a34cad218620f4ad9846160123..88890556bed44ef9cfb8f990be3c839074f10bac 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/utils/sort/Attic/psort.c,v 1.40 1998/06/15 18:39:45 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/utils/sort/Attic/psort.c,v 1.41 1998/06/15 19:29:54 momjian Exp $
  *
  * NOTES
  *             Sorts the first relation into the second relation.
@@ -1072,9 +1072,7 @@ resettape(FILE *file)
 
        file = freopen(tp->tl_name, "w+", file);
        if (file == NULL)
-       {
                elog(FATAL, "could not freopen temporary file");
-       }
 }
 
 #endif
index 3f9bc0410d348432ba260ecc15c054e3d666c5e3..14b961f066916714c68a5faa656b47cbeb40d342 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/utils/time/tqual.c,v 1.15 1998/04/24 14:42:42 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/utils/time/tqual.c,v 1.16 1998/06/15 19:29:58 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -44,9 +44,7 @@ setheapoverride(bool on)
                HeapSpecialCommandId = GetCurrentCommandId();
        }
        else
-       {
                HeapSpecialTransactionId = InvalidTransactionId;
-       }
 }
 
 #endif                                                 /* !defined(GOODAMI) */
index dddc211ea822c3b9a6a7600afdc790f839f619de..bc58b8e45c239f38ec0dff0395f78f313267c27a 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/bin/pg_dump/common.c,v 1.20 1998/02/26 04:38:41 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/bin/pg_dump/common.c,v 1.21 1998/06/15 19:30:00 momjian Exp $
  *
  * Modifications - 6/12/96 - dave@bensoft.com - version 1.13.dhb.2
  *
@@ -126,9 +126,7 @@ findParentsByOid(TableInfo *tblinfo, int numTables,
        for (i = 0; i < numInherits; i++)
        {
                if (strcmp(inhinfo[i].inhrel, oid) == 0)
-               {
                        numParents++;
-               }
        }
 
        *numParentsPtr = numParents;
@@ -396,9 +394,7 @@ flagInhAttrs(TableInfo *tblinfo, int numTables,
                                if (strInArray(tblinfo[i].attnames[j],
                                                           tblinfo[parentInd].attnames,
                                                           tblinfo[parentInd].numatts) != -1)
-                               {
                                        tblinfo[i].inhAttrs[j] = 1;
-                               }
                        }
                }
        }
@@ -493,8 +489,6 @@ fmtId(const char *rawid)
                cp = id;
        }
        else
-       {
                cp = rawid;
-       }
        return (cp);
 }      /* fmtId() */
index f386231d14e8a14b1f12f2d4642d2100f7a9d31c..b57c8bf85b1eb7bb5a3ab9cfdc648fb4895e2ccc 100644 (file)
@@ -21,7 +21,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.71 1998/05/06 23:53:27 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/bin/pg_dump/pg_dump.c,v 1.72 1998/06/15 19:30:01 momjian Exp $
  *
  * Modifications - 6/10/96 - dave@bensoft.com - version 1.13.dhb
  *
@@ -351,9 +351,7 @@ dumpClasses_dumpData(FILE *fout, const char *classname,
                do
                {
                        if (PQgetisnull(res, tuple, field))
-                       {
                                fprintf(fout, "NULL");
-                       }
                        else
                        {
                                switch (PQftype(res, field))
@@ -613,9 +611,7 @@ main(int argc, char **argv)
 
        /* open the output file */
        if (filename == NULL)
-       {
                g_fout = stdout;
-       }
        else
        {
                g_fout = fopen(filename, "w");
@@ -688,9 +684,7 @@ main(int argc, char **argv)
                tblinfo = dumpSchema(NULL, &numTables, tablename, acls);
 
        if (!schemaOnly)
-       {
                dumpClasses(tblinfo, numTables, g_fout, tablename, oids);
-       }
 
        if (!dataOnly)                          /* dump indexes and triggers at the end
                                                                 * for performance */
@@ -2011,9 +2005,7 @@ dumpFuncs(FILE *fout, FuncInfo *finfo, int numFuncs,
        int                     i;
 
        for (i = 0; i < numFuncs; i++)
-       {
                dumpOneFunc(fout, finfo, i, tinfo, numTypes);
-       }
 }
 
 /*
@@ -2228,9 +2220,7 @@ dumpAggs(FILE *fout, AggInfo *agginfo, int numAggs,
                if (strcmp(agginfo[i].aggfinalfn, "-") == 0)
                        finalfunc[0] = '\0';
                else
-               {
                        sprintf(finalfunc, "FINALFUNC = %s", agginfo[i].aggfinalfn);
-               }
                if (sfunc1[0] != '\0' && sfunc2[0] != '\0')
                {
                        comma1[0] = ',';
@@ -2581,9 +2571,7 @@ dumpIndices(FILE *fout, IndInfo *indinfo, int numIndices,
                                                                   fmtId(indinfo[i].indrelname));
 
                if (strcmp(indinfo[i].indproc, "0") == 0)
-               {
                        funcname = NULL;
-               }
                else
                {
 
@@ -2729,9 +2717,7 @@ dumpTuples(PGresult *res, FILE *fout, int *attrmap)
                for (j = 0; j < n; j++)
                {
                        for (k = 0; k < m; k++)
-                       {
                                outVals[attrmap[k]] = PQgetvalue(res, j, k);
-                       }
                        for (k = 0; k < m; k++)
                        {
                                char       *pval = outVals[k];
index b246131b84af0fdae82a7c25ee81369ea61ab1eb..7388946051e0d4774c3432cfbf087130e353da42 100644 (file)
@@ -9,7 +9,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/bin/pg_id/Attic/pg_id.c,v 1.5 1997/09/08 02:32:52 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/bin/pg_id/Attic/pg_id.c,v 1.6 1998/06/15 19:30:03 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -53,9 +53,7 @@ main(int argc, char **argv)
                printf("%ld\n", (long) pw->pw_uid);
        }
        else
-       {
                printf("%ld\n", (long) getuid());
-       }
 
        exit(0);
 }
index f344dd403efe899cbae7808725e6e67935da615a..d121d28a14a679de72c58a7e7a4c1c9a3597118a 100644 (file)
@@ -76,9 +76,7 @@ int
 Tcl_AppInit(Tcl_Interp * interp)
 {
        if (Tcl_Init(interp) == TCL_ERROR)
-       {
                return TCL_ERROR;
-       }
 
        /*
         * Call the init procedures for included packages.      Each call should
@@ -90,9 +88,7 @@ Tcl_AppInit(Tcl_Interp * interp)
         */
 
        if (Pgtcl_Init(interp) == TCL_ERROR)
-       {
                return TCL_ERROR;
-       }
 
        /*
         * Call Tcl_CreateCommand for application-specific commands, if they
index bdb569cb3c98826e5916a4c3463221d346c66c75..0bf685bd1a3fa131b9224c1a2ef6b12c2ef3f09b 100644 (file)
@@ -75,13 +75,9 @@ int
 Tcl_AppInit(Tcl_Interp * interp)
 {
        if (Tcl_Init(interp) == TCL_ERROR)
-       {
                return TCL_ERROR;
-       }
        if (Tk_Init(interp) == TCL_ERROR)
-       {
                return TCL_ERROR;
-       }
 
        /*
         * Call the init procedures for included packages.      Each call should
@@ -93,9 +89,7 @@ Tcl_AppInit(Tcl_Interp * interp)
         */
 
        if (Pgtcl_Init(interp) == TCL_ERROR)
-       {
                return TCL_ERROR;
-       }
 
        /*
         * Call Tcl_CreateCommand for application-specific commands, if they
index e698f68fb53c64ffb6cb7840aaffe4e61dc2acb5..9f699ad8d74a8363303e29eed0c4d867864e3686 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.144 1998/05/15 01:57:33 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/bin/psql/Attic/psql.c,v 1.145 1998/06/15 19:30:07 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -307,9 +307,7 @@ handle_sigint (SIGNAL_ARGS)
                exit(1);                                /* accept signal if no connection */
        /* Try to send cancel request */
        if (PQrequestCancel(cancelConn))
-       {
                fprintf(stderr, "\nCANCEL request sent\n");
-       }
        else
        {
                fprintf(stderr, "\nCannot send cancel request:\n%s\n",
@@ -1361,13 +1359,9 @@ do_copy(const char *args, PsqlSettings *pset)
                        strcat(query, " TO stdout");
 
                if (from)
-               {
                        copystream = fopen(file, "r");
-               }
                else
-               {
                        copystream = fopen(file, "w");
-               }
                if (copystream == NULL)
                        fprintf(stderr,
                                "Unable to open file %s which to copy, errno = %s (%d).",
@@ -2176,9 +2170,7 @@ MainLoop(PsqlSettings *pset, char *query, FILE *source)
 
                }
                else
-               {
                        query_alloced = true;
-               }
        }
 
        interactive = ((source == stdin) && !pset->notty);
@@ -2321,9 +2313,7 @@ MainLoop(PsqlSettings *pset, char *query, FILE *source)
                                                        strcat(query, query_start);
                                                }
                                                else
-                                               {
                                                        strcpy(query, query_start);
-                                               }
                                        }
                                        line[i] = hold_char;
                                        query_start = line + i;
@@ -2345,9 +2335,7 @@ MainLoop(PsqlSettings *pset, char *query, FILE *source)
 
                                /* inside a quote? */
                                if (in_quote && (line[i] != '\'' || was_bslash))
-                               {
                                         /* do nothing */ ;
-                               }
                                else if (xcomment != NULL)              /* inside an extended
                                                                                                 * comment? */
                                {
@@ -2375,9 +2363,7 @@ MainLoop(PsqlSettings *pset, char *query, FILE *source)
                                        break;
                                }
                                else if (line[i] == '\'')
-                               {
                                        in_quote ^= 1;
-                               }
                                /* semi-colon? then send query now */
                                else if (!paren_level && line[i] == ';')
                                {
@@ -2411,9 +2397,7 @@ MainLoop(PsqlSettings *pset, char *query, FILE *source)
 
                                }
                                else if (paren_level && line[i] == ')')
-                               {
                                        paren_level--;
-                               }
                        }
                }
 
@@ -2544,9 +2528,7 @@ main(int argc, char **argv)
                        case 'c':
                                singleQuery = strdup(optarg);
                                if (singleQuery[0] == '\\')
-                               {
                                        singleSlashCmd = 1;
-                               }
                                break;
                        case 'd':
                                dbname = optarg;
@@ -2625,9 +2607,7 @@ main(int argc, char **argv)
                free(connect_string);
        }
        else
-       {
                settings.db = PQsetdb(host, port, NULL, NULL, dbname);
-       }
 
        dbname = PQdb(settings.db);
 
@@ -2642,9 +2622,7 @@ main(int argc, char **argv)
        cancelConn = settings.db;       /* enable SIGINT to send cancel */
 
        if (listDatabases)
-       {
                exit(listAllDbs(&settings));
-       }
        if (!settings.quiet && !settings.notty && !singleQuery && !qfilename)
        {
                printf("Welcome to the POSTGRESQL interactive sql monitor:\n");
@@ -2802,9 +2780,7 @@ handleCopyIn(PGresult *res, const bool mustprompt, FILE *copystream)
                        for (; buflen > 1 &&
                                 !(linedone = (c = getc(copystream)) == '\n' || c == EOF);
                                 --buflen)
-                       {
                                *s++ = c;
-                       }
                        if (c == EOF)
                        {
                                PQputline(res->conn, "\\.");
@@ -2816,9 +2792,7 @@ handleCopyIn(PGresult *res, const bool mustprompt, FILE *copystream)
                        if (firstload)
                        {
                                if (!strcmp(copybuf, "\\."))
-                               {
                                        copydone = true;
-                               }
                                firstload = false;
                        }
                }
@@ -2949,9 +2923,7 @@ make_connect_string(char *host, char *port, char *dbname,
 
        connect_string = (char *) malloc(connect_string_len);
        if (!connect_string)
-       {
                return 0;
-       }
        connect_string[0] = '\0';
        if (host)
        {
index ecbd2354617998d5b104fbe5748bdb3ab0ca5ea5..8e4f8cdd25a60d7e1b2bf1342b5912e92e7af785 100644 (file)
@@ -895,9 +895,7 @@ ECPGdisconnect(int lineno, const char *connection_name)
                        return false;
                }
                else
-               {
                        ECPGfinish(con);
-               }
        }
        
        return true;
index dd395c80eb94aeee60f610e133297bd271f6d7b6..7f4041de3b504759f5518d7cc61c21e173cb55a8 100644 (file)
@@ -291,9 +291,7 @@ ECPGdump_a_struct(FILE *o, const char *name, const char * ind_name, long arrsiz,
                offset = obuf;
        }
        else
-       {
                offset = offsetarg;
-       }
 
        sprintf(pbuf, "%s%s.", prefix ? prefix : "", name);
        prefix = pbuf;
@@ -349,9 +347,7 @@ ECPGfree_type(struct ECPGtype * typ)
                        free(typ->u.members);
                }
                else
-               {
                        abort();
-               }
        }
        free(typ);
 }
index 0d80434edbdf62c9b3d75fbad329cf07add66dfa..b7eae9d6b78513987e0198b11b68acce5821c0d7 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/pgtclCmds.c,v 1.23 1998/03/30 17:39:16 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/interfaces/libpgtcl/Attic/pgtclCmds.c,v 1.24 1998/06/15 19:30:17 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -62,13 +62,9 @@ translate_escape(char *p, int isArray)
                case '7':
                        c = DIGIT(c);
                        if (ISOCTAL(*s))
-                       {
                                c = (c << 3) + DIGIT(*s++);
-                       }
                        if (ISOCTAL(*s))
-                       {
                                c = (c << 3) + DIGIT(*s++);
-                       }
                        *p = c;
                        break;
                case 'b':
@@ -102,13 +98,9 @@ translate_escape(char *p, int isArray)
                         * the caller.
                         */
                        if (isArray)
-                       {
                                return p + 1;
-                       }
                        else
-                       {
                                *p = c;
-                       }
                        break;
                case '\0':
 
@@ -132,9 +124,7 @@ translate_escape(char *p, int isArray)
        /* Shift the rest of the buffer over itself after the current char */
        q = p + 1;
        for (; *s;)
-       {
                *q++ = *s++;
-       }
        *q = '\0';
 #ifdef TCL_ARRAYS_DEBUG_ESCAPE
        printf("   after  = '%s'\n", p);
@@ -158,9 +148,7 @@ tcl_value(char *value)
        char       *p;
 
        if (!value)
-       {
                return ((char *) NULL);
-       }
 
 #ifdef TCL_ARRAYS_DEBUG
        printf("pq_value  = '%s'\n", value);
@@ -206,9 +194,7 @@ tcl_value(char *value)
                                }
                        }
                        if (!*p)
-                       {
                                break;
-                       }
                }
        }
        else
@@ -225,9 +211,7 @@ tcl_value(char *value)
                                p = translate_escape(p, 0);
                        }
                        if (!*p)
-                       {
                                break;
-                       }
                }
        }
 #ifdef TCL_ARRAYS_DEBUG
@@ -1236,9 +1220,7 @@ Pg_select(ClientData cData, Tcl_Interp *interp, int argc, char **argv)
                Tcl_SetVar2(interp, argv[3], ".tupno", buffer, 0);
 
                for (column = 0; column < ncols; column++)
-               {
                        Tcl_SetVar2(interp, argv[3], info[column].cname, PQgetvalue(result, tupno, column), 0);
-               }
 
                Tcl_SetVar2(interp, argv[3], ".command", "update", 0);
 
index 148d93434972bc8875866ce00bf4329e0f296c8a..a5d842d905de3517905dea4fed94948ca0a6134b 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-auth.c,v 1.16 1998/03/22 04:18:17 scrappy Exp $
+ *       $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-auth.c,v 1.17 1998/06/15 19:30:22 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -396,9 +396,7 @@ pg_krb5_sendauth(const char *PQerrormsg, int sock,
        strcpy(servbuf, PG_KRB_SRVNAM);
        *(hostp = servbuf + (sizeof(PG_KRB_SRVNAM) - 1)) = '/';
        if (hostname || *hostname)
-       {
                strncpy(++hostp, hostname, MAXHOSTNAMELEN);
-       }
        else
        {
                if (gethostname(++hostp, MAXHOSTNAMELEN) < 0)
index 288f159c74078e303cc29257867ea267743580b8..20c02950b1d26031aea05ba555b6fac81ba6cbc1 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.66 1998/05/06 23:51:11 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-connect.c,v 1.67 1998/06/15 19:30:23 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -328,17 +328,11 @@ PQsetdbLogin(const char *pghost, const char *pgport, const char *pgoptions, cons
                conn->pgoptions = strdup(pgoptions);
 
        if (login)
-       {
                conn->pguser = strdup(login);
-       }
        else if ((tmp = getenv("PGUSER")) != NULL)
-       {
                conn->pguser = strdup(tmp);
-       }
        else
-       {
                conn->pguser = fe_getauthname(conn->errorMessage);
-       }
 
        if (conn->pguser == NULL)
        {
@@ -348,17 +342,11 @@ PQsetdbLogin(const char *pghost, const char *pgport, const char *pgoptions, cons
        }
 
        if (pwd)
-       {
                conn->pgpass = strdup(pwd);
-       }
        else if ((tmp = getenv("PGPASSWORD")) != NULL)
-       {
                conn->pgpass = strdup(tmp);
-       }
        else
-       {
                conn->pgpass = strdup(DefaultPassword);
-       }
 
        if ((dbName == NULL) || dbName[0] == '\0')
        {
@@ -465,9 +453,7 @@ connectDB(PGconn *conn)
                len = sizeof(struct sockaddr_in);
        }
        else
-       {
                len = UNIXSOCK_PATH(conn->raddr.un, portno);
-       }
 
        /* Connect to the server  */
        if ((conn->sock = socket(family, SOCK_STREAM, 0)) < 0)
@@ -846,9 +832,7 @@ void
 PQfinish(PGconn *conn)
 {
        if (!conn)
-       {
                fprintf(stderr, "PQfinish() -- pointer to PGconn is null\n");
-       }
        else
        {
                closePGconn(conn);
@@ -864,9 +848,7 @@ void
 PQreset(PGconn *conn)
 {
        if (!conn)
-       {
                fprintf(stderr, "PQreset() -- pointer to PGconn is null\n");
-       }
        else
        {
                closePGconn(conn);
@@ -941,18 +923,14 @@ conninfo_parse(const char *conninfo, char *errorMessage)
                while (*cp)
                {
                        if (*cp == '=')
-                       {
                                break;
-                       }
                        if (isspace(*cp))
                        {
                                *cp++ = '\0';
                                while (*cp)
                                {
                                        if (!isspace(*cp))
-                                       {
                                                break;
-                                       }
                                        cp++;
                                }
                                break;
@@ -975,9 +953,7 @@ conninfo_parse(const char *conninfo, char *errorMessage)
                while (*cp)
                {
                        if (!isspace(*cp))
-                       {
                                break;
-                       }
                        cp++;
                }
 
@@ -997,14 +973,10 @@ conninfo_parse(const char *conninfo, char *errorMessage)
                                {
                                        cp++;
                                        if (*cp != '\0')
-                                       {
                                                *cp2++ = *cp++;
-                                       }
                                }
                                else
-                               {
                                        *cp2++ = *cp++;
-                               }
                        }
                        *cp2 = '\0';
                }
@@ -1025,9 +997,7 @@ conninfo_parse(const char *conninfo, char *errorMessage)
                                {
                                        cp++;
                                        if (*cp != '\0')
-                                       {
                                                *cp2++ = *cp++;
-                                       }
                                        continue;
                                }
                                if (*cp == '\'')
@@ -1048,9 +1018,7 @@ conninfo_parse(const char *conninfo, char *errorMessage)
                for (option = PQconninfoOptions; option->keyword != NULL; option++)
                {
                        if (!strcmp(option->keyword, pname))
-                       {
                                break;
-                       }
                }
                if (option->keyword == NULL)
                {
@@ -1112,9 +1080,7 @@ conninfo_parse(const char *conninfo, char *errorMessage)
                {
                        tmp = fe_getauthname(errortmp);
                        if (tmp)
-                       {
                                option->val = strdup(tmp);
-                       }
                }
 
                /* ----------
@@ -1125,9 +1091,7 @@ conninfo_parse(const char *conninfo, char *errorMessage)
                {
                        tmp = conninfo_getval("user");
                        if (tmp)
-                       {
                                option->val = strdup(tmp);
-                       }
                }
        }
 
@@ -1143,9 +1107,7 @@ conninfo_getval(char *keyword)
        for (option = PQconninfoOptions; option->keyword != NULL; option++)
        {
                if (!strcmp(option->keyword, keyword))
-               {
                        return option->val;
-               }
        }
 
        return NULL;
@@ -1273,9 +1235,7 @@ PQtrace(PGconn *conn, FILE *debug_port)
 {
        if (conn == NULL ||
                conn->status == CONNECTION_BAD)
-       {
                return;
-       }
        PQuntrace(conn);
        conn->Pfdebug = debug_port;
 }
@@ -1285,9 +1245,7 @@ PQuntrace(PGconn *conn)
 {
        /* note: better allow untrace even when connection bad */
        if (conn == NULL)
-       {
                return;
-       }
        if (conn->Pfdebug)
        {
                fflush(conn->Pfdebug);
index c48e9aa9b15cd0be27751552724f4659748bc8f5..8b4a55e290ea6014d8877fd719edfc313ad3e565 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.52 1998/05/14 17:18:14 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-exec.c,v 1.53 1998/06/15 19:30:25 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -258,9 +258,7 @@ PQconsumeInput(PGconn *conn)
         * Note that we will NOT block waiting for more input.
         */
        if (pqReadData(conn) < 0)
-       {
                strcpy(conn->asyncErrorMessage, conn->errorMessage);
-       }
        /* Parsing of the data waits till later. */
 }
 
@@ -580,9 +578,7 @@ getAnotherTuple(PGconn *conn, int binary)
                        if (pqGetInt(&vlen, 4, conn))
                                return EOF;
                        if (binary == 0)
-                       {
                                vlen = vlen - 4;
-                       }
                        if (vlen < 0)
                                vlen = 0;
                        if (tup[i].value == NULL)
@@ -950,9 +946,7 @@ void
 PQputline(PGconn *conn, const char *s)
 {
        if (conn && conn->sock >= 0)
-       {
                (void) pqPutnchar(s, strlen(s), conn);
-       }
 }
 
 /*
@@ -1237,9 +1231,7 @@ PQfname(PGresult *res, int field_num)
                return NULL;
        }
        if (res->attDescs)
-       {
                return res->attDescs[field_num].name;
-       }
        else
                return NULL;
 }
@@ -1304,9 +1296,7 @@ PQftype(PGresult *res, int field_num)
                return InvalidOid;
        }
        if (res->attDescs)
-       {
                return res->attDescs[field_num].adtid;
-       }
        else
                return InvalidOid;
 }
@@ -1328,9 +1318,7 @@ PQfsize(PGresult *res, int field_num)
                return 0;
        }
        if (res->attDescs)
-       {
                return res->attDescs[field_num].adtsize;
-       }
        else
                return 0;
 }
@@ -1352,9 +1340,7 @@ PQfmod(PGresult *res, int field_num)
                return 0;
        }
        if (res->attDescs)
-       {
                return res->attDescs[field_num].adtmod;
-       }
        else
                return 0;
 }
index 126a704b32cb50a85dde72cabe7059b06404488d..d18a4d53c153e152ce8692973f84b3012f79ad42 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-lobj.c,v 1.12 1998/05/12 21:44:03 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-lobj.c,v 1.13 1998/06/15 19:30:26 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -51,9 +51,7 @@ lo_open(PGconn *conn, Oid lobjId, int mode)
        if (conn->lobjfuncs == (PGlobjfuncs *) NULL)
        {
                if (lo_initialize(conn) < 0)
-               {
                        return -1;
-               }
        }
 
        res = PQfn(conn, conn->lobjfuncs->fn_lo_open, &fd, &result_len, 1, argv, 2);
@@ -89,9 +87,7 @@ lo_close(PGconn *conn, int fd)
        if (conn->lobjfuncs == (PGlobjfuncs *) NULL)
        {
                if (lo_initialize(conn) < 0)
-               {
                        return -1;
-               }
        }
 
        argv[0].isint = 1;
@@ -126,9 +122,7 @@ lo_read(PGconn *conn, int fd, char *buf, int len)
        if (conn->lobjfuncs == (PGlobjfuncs *) NULL)
        {
                if (lo_initialize(conn) < 0)
-               {
                        return -1;
-               }
        }
 
        argv[0].isint = 1;
@@ -166,9 +160,7 @@ lo_write(PGconn *conn, int fd, char *buf, int len)
        if (conn->lobjfuncs == (PGlobjfuncs *) NULL)
        {
                if (lo_initialize(conn) < 0)
-               {
                        return -1;
-               }
        }
 
        if (len <= 0)
@@ -211,9 +203,7 @@ lo_lseek(PGconn *conn, int fd, int offset, int whence)
        if (conn->lobjfuncs == (PGlobjfuncs *) NULL)
        {
                if (lo_initialize(conn) < 0)
-               {
                        return -1;
-               }
        }
 
        argv[0].isint = 1;
@@ -259,9 +249,7 @@ lo_creat(PGconn *conn, int mode)
        if (conn->lobjfuncs == (PGlobjfuncs *) NULL)
        {
                if (lo_initialize(conn) < 0)
-               {
                        return -1;
-               }
        }
 
        argv[0].isint = 1;
@@ -296,9 +284,7 @@ lo_tell(PGconn *conn, int fd)
        if (conn->lobjfuncs == (PGlobjfuncs *) NULL)
        {
                if (lo_initialize(conn) < 0)
-               {
                        return -1;
-               }
        }
 
        argv[0].isint = 1;
@@ -333,9 +319,7 @@ lo_unlink(PGconn *conn, Oid lobjId)
        if (conn->lobjfuncs == (PGlobjfuncs *) NULL)
        {
                if (lo_initialize(conn) < 0)
-               {
                        return -1;
-               }
        }
 
        argv[0].isint = 1;
@@ -546,37 +530,21 @@ lo_initialize(PGconn *conn)
                fname = PQgetvalue(res, n, 0);
                foid = (Oid) atoi(PQgetvalue(res, n, 1));
                if (!strcmp(fname, "lo_open"))
-               {
                        lobjfuncs->fn_lo_open = foid;
-               }
                else if (!strcmp(fname, "lo_close"))
-               {
                        lobjfuncs->fn_lo_close = foid;
-               }
                else if (!strcmp(fname, "lo_creat"))
-               {
                        lobjfuncs->fn_lo_creat = foid;
-               }
                else if (!strcmp(fname, "lo_unlink"))
-               {
                        lobjfuncs->fn_lo_unlink = foid;
-               }
                else if (!strcmp(fname, "lo_lseek"))
-               {
                        lobjfuncs->fn_lo_lseek = foid;
-               }
                else if (!strcmp(fname, "lo_tell"))
-               {
                        lobjfuncs->fn_lo_tell = foid;
-               }
                else if (!strcmp(fname, "loread"))
-               {
                        lobjfuncs->fn_lo_read = foid;
-               }
                else if (!strcmp(fname, "lowrite"))
-               {
                        lobjfuncs->fn_lo_write = foid;
-               }
        }
 
        PQclear(res);
index bbe112d2ef71677febb938fdb7b363bc303ac9d5..e79460798d9e4e712769d802d9bc12b31f955269 100644 (file)
@@ -24,7 +24,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-misc.c,v 1.14 1998/05/12 15:42:09 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-misc.c,v 1.15 1998/06/15 19:30:26 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -316,9 +316,7 @@ pqReadData(PGconn *conn)
                conn->inStart = 0;
        }
        else
-       {
                conn->inStart = conn->inCursor = conn->inEnd = 0;
-       }
        /* If the buffer is fairly full, enlarge it.
         * We need to be able to enlarge the buffer in case a single message
         * exceeds the initial buffer size.  We enlarge before filling the
index 5b86f950959896adb18266667f29e45e0f66a429..493b37d0a3e3a851455f388a357fa9b909549756 100644 (file)
@@ -9,7 +9,7 @@
  * didn't really belong there.
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-print.c,v 1.2 1998/05/07 16:17:18 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-print.c,v 1.3 1998/06/15 19:30:26 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -327,9 +327,7 @@ PQdisplayTuples(PGresult *res,
 
        /* Zero the initial field lengths */
        for (j = 0; j < nFields; j++)
-       {
                fLength[j] = strlen(PQfname(res, j));
-       }
        /* Find the max length of each field in the result */
        /* will be somewhat time consuming for very large results */
        if (fillAlign)
@@ -415,9 +413,7 @@ PQprintTuples(PGresult *res,
        nTups = PQntuples(res);
 
        if (colWidth > 0)
-       {
                sprintf(formatString, "%%s %%-%ds", colWidth);
-       }
        else
                sprintf(formatString, "%%s %%s");
 
index 3a43271be0d5d4b09af8f507c8d30bac7a1a43af..815c00f343d904a4c6666bce2fe67be2f797e1d7 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/interfaces/libpq/pqsignal.c,v 1.5 1997/09/08 02:40:37 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/interfaces/libpq/pqsignal.c,v 1.6 1998/06/15 19:30:26 momjian Exp $
  *
  * NOTES
  *             This shouldn't be in libpq, but the monitor and some other
@@ -35,9 +35,7 @@ pqsignal(int signo, pqsigfunc func)
        sigemptyset(&act.sa_mask);
        act.sa_flags = 0;
        if (signo != SIGALRM)
-       {
                act.sa_flags |= SA_RESTART;
-       }
        if (sigaction(signo, &act, &oact) < 0)
                return (SIG_ERR);
        return (oact.sa_handler);
index 8a01e6509a000dcc180f83892cb1c6682e74d992..751a243b40792834664580084a0d3d9ed84bb5ed 100644 (file)
@@ -3,7 +3,7 @@
  *                       procedural language (PL)
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/pl/tcl/pltcl.c,v 1.2 1998/02/26 04:46:10 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/pl/tcl/pltcl.c,v 1.3 1998/06/15 19:30:27 momjian Exp $
  *
  *       This software is copyrighted by Jan Wieck - Hamburg.
  *
@@ -302,14 +302,10 @@ pltcl_init_safe_interp(void)
         * Try to load the unknown procedure from pltcl_modules
         ************************************************************/
        if (SPI_connect() != SPI_OK_CONNECT)
-       {
                elog(ERROR, "pltcl_init_safe_interp(): SPI_connect failed");
-       }
        pltcl_init_load_unknown();
        if (SPI_finish() != SPI_OK_FINISH)
-       {
                elog(ERROR, "pltcl_init_safe_interp(): SPI_finish failed");
-       }
 #endif                                                 /* PLTCL_UNKNOWN_SUPPORT */
 }
 
@@ -336,13 +332,9 @@ pltcl_init_load_unknown(void)
        spi_rc = SPI_exec("select 1 from pg_class "
                                          "where relname = 'pltcl_modules'", 1);
        if (spi_rc != SPI_OK_SELECT)
-       {
                elog(ERROR, "pltcl_init_load_unknown(): select from pg_class failed");
-       }
        if (SPI_processed == 0)
-       {
                return;
-       }
 
        /************************************************************
         * Read all the row's from it where modname = 'unknown' in
@@ -411,17 +403,13 @@ pltcl_call_handler(FmgrInfo *proinfo,
         * Initialize interpreters on first call
         ************************************************************/
        if (pltcl_firstcall)
-       {
                pltcl_init_all();
-       }
 
        /************************************************************
         * Connect to SPI manager
         ************************************************************/
        if (SPI_connect() != SPI_OK_CONNECT)
-       {
                elog(ERROR, "pltcl: cannot connect to SPI manager");
-       }
        /************************************************************
         * Keep track about the nesting of Tcl-SPI-Tcl-... calls
         ************************************************************/
@@ -432,13 +420,9 @@ pltcl_call_handler(FmgrInfo *proinfo,
         * call appropriate subhandler
         ************************************************************/
        if (CurrentTriggerData == NULL)
-       {
                retval = pltcl_func_handler(proinfo, proargs, isNull);
-       }
        else
-       {
                retval = (Datum) pltcl_trigger_handler(proinfo);
-       }
 
        pltcl_call_level--;
 
@@ -446,9 +430,7 @@ pltcl_call_handler(FmgrInfo *proinfo,
         * Disconnect from SPI manager
         ************************************************************/
        if (SPI_finish() != SPI_OK_FINISH)
-       {
                elog(ERROR, "pltcl: SPI_finish() failed");
-       }
 
        return retval;
 }
@@ -576,26 +558,20 @@ pltcl_func_handler(FmgrInfo *proinfo,
                        {
                                prodesc->arg_is_rel[i] = 1;
                                if (i > 0)
-                               {
                                        strcat(proc_internal_args, " ");
-                               }
                                sprintf(buf, "__PLTcl_Tup_%d", i + 1);
                                strcat(proc_internal_args, buf);
                                continue;
                        }
                        else
-                       {
                                prodesc->arg_is_rel[i] = 0;
-                       }
 
                        fmgr_info(typeStruct->typoutput, &(prodesc->arg_out_func[i]));
                        prodesc->arg_out_elem[i] = (Oid) (typeStruct->typelem);
                        prodesc->arg_out_len[i] = typeStruct->typlen;
 
                        if (i > 0)
-                       {
                                strcat(proc_internal_args, " ");
-                       }
                        sprintf(buf, "%d", i + 1);
                        strcat(proc_internal_args, buf);
                }
@@ -680,9 +656,7 @@ pltcl_func_handler(FmgrInfo *proinfo,
                Tcl_DStringFree(&list_tmp);
                pltcl_restart_in_progress = 1;
                if (--pltcl_call_level == 0)
-               {
                        pltcl_restart_in_progress = 0;
-               }
                siglongjmp(Warn_restart, 1);
        }
 
@@ -742,15 +716,11 @@ pltcl_func_handler(FmgrInfo *proinfo,
                {
                        pltcl_restart_in_progress = 1;
                        if (--pltcl_call_level == 0)
-                       {
                                pltcl_restart_in_progress = 0;
-                       }
                        elog(ERROR, "pltcl: %s", pltcl_safe_interp->result);
                }
                if (--pltcl_call_level == 0)
-               {
                        pltcl_restart_in_progress = 0;
-               }
                siglongjmp(Warn_restart, 1);
        }
 
@@ -766,9 +736,7 @@ pltcl_func_handler(FmgrInfo *proinfo,
                memcpy(&Warn_restart, &save_restart, sizeof(Warn_restart));
                pltcl_restart_in_progress = 1;
                if (--pltcl_call_level == 0)
-               {
                        pltcl_restart_in_progress = 0;
-               }
                siglongjmp(Warn_restart, 1);
        }
 
@@ -956,9 +924,7 @@ pltcl_trigger_handler(FmgrInfo *proinfo)
                Tcl_DStringFree(&tcl_newtup);
                pltcl_restart_in_progress = 1;
                if (--pltcl_call_level == 0)
-               {
                        pltcl_restart_in_progress = 0;
-               }
                siglongjmp(Warn_restart, 1);
        }
 
@@ -976,40 +942,26 @@ pltcl_trigger_handler(FmgrInfo *proinfo)
        /* A list of attribute names for argument TG_relatts */
        Tcl_DStringAppendElement(&tcl_trigtup, "");
        for (i = 0; i < tupdesc->natts; i++)
-       {
                Tcl_DStringAppendElement(&tcl_trigtup, tupdesc->attrs[i]->attname.data);
-       }
        Tcl_DStringAppendElement(&tcl_cmd, Tcl_DStringValue(&tcl_trigtup));
        Tcl_DStringFree(&tcl_trigtup);
        Tcl_DStringInit(&tcl_trigtup);
 
        /* The when part of the event for TG_when */
        if (TRIGGER_FIRED_BEFORE(trigdata->tg_event))
-       {
                Tcl_DStringAppendElement(&tcl_cmd, "BEFORE");
-       }
        else if (TRIGGER_FIRED_AFTER(trigdata->tg_event))
-       {
                Tcl_DStringAppendElement(&tcl_cmd, "AFTER");
-       }
        else
-       {
                Tcl_DStringAppendElement(&tcl_cmd, "UNKNOWN");
-       }
 
        /* The level part of the event for TG_level */
        if (TRIGGER_FIRED_FOR_ROW(trigdata->tg_event))
-       {
                Tcl_DStringAppendElement(&tcl_cmd, "ROW");
-       }
        else if (TRIGGER_FIRED_FOR_STATEMENT(trigdata->tg_event))
-       {
                Tcl_DStringAppendElement(&tcl_cmd, "STATEMENT");
-       }
        else
-       {
                Tcl_DStringAppendElement(&tcl_cmd, "UNKNOWN");
-       }
 
        /* Build the data list for the trigtuple */
        pltcl_build_tuple_argument(trigdata->tg_trigtuple,
@@ -1067,9 +1019,7 @@ pltcl_trigger_handler(FmgrInfo *proinfo)
         * Finally append the arguments from CREATE TRIGGER
         ************************************************************/
        for (i = 0; i < trigdata->tg_trigger->tgnargs; i++)
-       {
                Tcl_DStringAppendElement(&tcl_cmd, trigdata->tg_trigger->tgargs[i]);
-       }
 
        /************************************************************
         * Call the Tcl function
@@ -1089,15 +1039,11 @@ pltcl_trigger_handler(FmgrInfo *proinfo)
                {
                        pltcl_restart_in_progress = 1;
                        if (--pltcl_call_level == 0)
-                       {
                                pltcl_restart_in_progress = 0;
-                       }
                        elog(ERROR, "pltcl: %s", pltcl_safe_interp->result);
                }
                if (--pltcl_call_level == 0)
-               {
                        pltcl_restart_in_progress = 0;
-               }
                siglongjmp(Warn_restart, 1);
        }
 
@@ -1115,9 +1061,7 @@ pltcl_trigger_handler(FmgrInfo *proinfo)
         * the magic strings OK or SKIP or a list from array get
         ************************************************************/
        if (strcmp(pltcl_safe_interp->result, "OK") == 0)
-       {
                return rettup;
-       }
        if (strcmp(pltcl_safe_interp->result, "SKIP") == 0)
        {
                return (HeapTuple) NULL;;
@@ -1161,9 +1105,7 @@ pltcl_trigger_handler(FmgrInfo *proinfo)
                ckfree(ret_values);
                pltcl_restart_in_progress = 1;
                if (--pltcl_call_level == 0)
-               {
                        pltcl_restart_in_progress = 0;
-               }
                siglongjmp(Warn_restart, 1);
        }
 
@@ -1190,9 +1132,7 @@ pltcl_trigger_handler(FmgrInfo *proinfo)
                 ************************************************************/
                attnum = SPI_fnumber(tupdesc, ret_values[i++]);
                if (attnum == SPI_ERROR_NOATTRIBUTE)
-               {
                        elog(ERROR, "pltcl: invalid attribute '%s'", ret_values[--i]);
-               }
 
                /************************************************************
                 * Lookup the attribute type in the syscache
@@ -1233,9 +1173,7 @@ pltcl_trigger_handler(FmgrInfo *proinfo)
        pfree(modnulls);
 
        if (rettup == NULL)
-       {
                elog(ERROR, "pltcl: SPI_modifytuple() failed - RC = %d\n", SPI_result);
-       }
 
        ckfree(ret_values);
        memcpy(&Warn_restart, &save_restart, sizeof(Warn_restart));
@@ -1280,29 +1218,17 @@ pltcl_elog(ClientData cdata, Tcl_Interp * interp,
        }
 
        if (strcmp(argv[1], "NOTICE") == 0)
-       {
                level = NOTICE;
-       }
        else if (strcmp(argv[1], "WARN") == 0)
-       {
                level = ERROR;
-       }
        else if (strcmp(argv[1], "ERROR") == 0)
-       {
                level = ERROR;
-       }
        else if (strcmp(argv[1], "FATAL") == 0)
-       {
                level = FATAL;
-       }
        else if (strcmp(argv[1], "DEBUG") == 0)
-       {
                level = DEBUG;
-       }
        else if (strcmp(argv[1], "NOIND") == 0)
-       {
                level = NOIND;
-       }
        else
        {
                Tcl_AppendResult(interp, "Unknown elog level '", argv[1],
@@ -1356,15 +1282,11 @@ pltcl_quote(ClientData cdata, Tcl_Interp * interp,
        while (*cp1)
        {
                if (*cp1 == '\'')
-               {
                        *cp2++ = '\'';
-               }
                else
                {
                        if (*cp1 == '\\')
-                       {
                                *cp2++ = '\\';
-                       }
                }
                *cp2++ = *cp1++;
        }
@@ -1440,9 +1362,7 @@ pltcl_SPI_exec(ClientData cdata, Tcl_Interp * interp,
                                return TCL_ERROR;
                        }
                        if (Tcl_GetInt(interp, argv[i++], &count) != TCL_OK)
-                       {
                                return TCL_ERROR;
-                       }
                        continue;
                }
 
@@ -1566,9 +1486,7 @@ pltcl_SPI_exec(ClientData cdata, Tcl_Interp * interp,
        if (argc == query_idx + 1)
        {
                if (ntuples > 0)
-               {
                        pltcl_set_tuple_values(interp, arrayname, 0, tuples[0], tupdesc);
-               }
                sprintf(buf, "%d", ntuples);
                Tcl_SetResult(interp, buf, TCL_VOLATILE);
                memcpy(&Warn_restart, &save_restart, sizeof(Warn_restart));
@@ -1653,9 +1571,7 @@ pltcl_SPI_prepare(ClientData cdata, Tcl_Interp * interp,
         * Split the argument type list
         ************************************************************/
        if (Tcl_SplitList(interp, argv[2], &nargs, &args) != TCL_OK)
-       {
                return TCL_ERROR;
-       }
 
        /************************************************************
         * Allocate the new querydesc structure
@@ -1698,9 +1614,7 @@ pltcl_SPI_prepare(ClientData cdata, Tcl_Interp * interp,
                                                                          PointerGetDatum(args[i]),
                                                                          0, 0, 0);
                if (!HeapTupleIsValid(typeTup))
-               {
                        elog(ERROR, "pltcl: Cache lookup of type %s failed", args[i]);
-               }
                qdesc->argtypes[i] = typeTup->t_oid;
                fmgr_info(((TypeTupleForm) GETSTRUCT(typeTup))->typinput,
                                  &(qdesc->arginfuncs[i]));
@@ -1879,9 +1793,7 @@ pltcl_SPI_execp(ClientData cdata, Tcl_Interp * interp,
                                return TCL_ERROR;
                        }
                        if (Tcl_GetInt(interp, argv[i++], &count) != TCL_OK)
-                       {
                                return TCL_ERROR;
-                       }
                        continue;
                }
 
@@ -1938,9 +1850,7 @@ pltcl_SPI_execp(ClientData cdata, Tcl_Interp * interp,
                 * Split the argument values
                 ************************************************************/
                if (Tcl_SplitList(interp, argv[i++], &callnargs, &callargs) != TCL_OK)
-               {
                        return TCL_ERROR;
-               }
 
                /************************************************************
                 * Check that the # of arguments matches
@@ -2003,9 +1913,7 @@ pltcl_SPI_execp(ClientData cdata, Tcl_Interp * interp,
                callargs = NULL;
        }
        else
-       {
                callnargs = 0;
-       }
 
        /************************************************************
         * Remember the index of the last processed call
@@ -2149,9 +2057,7 @@ pltcl_SPI_execp(ClientData cdata, Tcl_Interp * interp,
        if (loop_body >= argc)
        {
                if (ntuples > 0)
-               {
                        pltcl_set_tuple_values(interp, arrayname, 0, tuples[0], tupdesc);
-               }
                memcpy(&Warn_restart, &save_restart, sizeof(Warn_restart));
                sprintf(buf, "%d", ntuples);
                Tcl_SetResult(interp, buf, TCL_VOLATILE);
@@ -2283,9 +2189,7 @@ pltcl_set_tuple_values(Tcl_Interp * interp, char *arrayname,
                        pfree(outputstr);
                }
                else
-               {
                        Tcl_UnsetVar2(interp, *arrptr, *nameptr, 0);
-               }
        }
 }
 
index 84973df807fc31dea8d2fd2dfc3fa77cc843d556..fc75467e4753645232c20dd863a08f7e2250fa17 100644 (file)
@@ -102,18 +102,14 @@ main()
        /* first, print out the attribute names */
        nFields = PQnfields(res);
        for (i = 0; i < nFields; i++)
-       {
                printf("%-15s", PQfname(res, i));
-       }
        printf("\n\n");
 
        /* next, print out the instances */
        for (i = 0; i < PQntuples(res); i++)
        {
                for (j = 0; j < nFields; j++)
-               {
                        printf("%-15s", PQgetvalue(res, i, j));
-               }
                printf("\n");
        }
 
index 2cbe622f9b467cf1abb2a402e97bbc8ad3b577b2..e497e7a8fb9d13af672232c1df9a2b7f15bd76e3 100644 (file)
@@ -121,18 +121,14 @@ main(int argc, char **argv)
        /* first, print out the attribute names */
        nFields = PQnfields(res1);
        for (i = 0; i < nFields; i++)
-       {
                printf("%-15s", PQfname(res1, i));
-       }
        printf("\n\n");
 
        /* next, print out the instances */
        for (i = 0; i < PQntuples(res1); i++)
        {
                for (j = 0; j < nFields; j++)
-               {
                        printf("%-15s", PQgetvalue(res1, i, j));
-               }
                printf("\n");
        }
 
index 8c18a2463c8b5543b9c9c5a4519f8d599a88c1d0..73841d47782f8a094711273d22b1ac2ce9e138d5 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/test/examples/testlo.c,v 1.8 1998/05/12 21:44:07 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/test/examples/testlo.c,v 1.9 1998/06/15 19:30:31 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -53,9 +53,7 @@ importFile(PGconn *conn, char *filename)
         */
        lobjId = lo_creat(conn, INV_READ | INV_WRITE);
        if (lobjId == 0)
-       {
                fprintf(stderr, "can't create large object");
-       }
 
        lobj_fd = lo_open(conn, lobjId, INV_WRITE);
 
@@ -66,9 +64,7 @@ importFile(PGconn *conn, char *filename)
        {
                tmp = lo_write(conn, lobj_fd, buf, nbytes);
                if (tmp < nbytes)
-               {
                        fprintf(stderr, "error while reading \"%s\"", filename);
-               }
        }
 
        close(fd);
@@ -241,9 +237,7 @@ main(int argc, char **argv)
 /*     lobjOid = importFile(conn, in_filename); */
        lobjOid = lo_import(conn, in_filename);
        if (lobjOid == 0)
-       {
                fprintf(stderr, "%s\n", PQerrorMessage(conn));
-       }
 /*
        printf("\tas large object %d.\n", lobjOid);
 
@@ -257,9 +251,7 @@ main(int argc, char **argv)
        printf("exporting large object to file \"%s\" ...\n", out_filename);
 /*       exportFile(conn, lobjOid, out_filename); */
        if (!lo_export(conn, lobjOid, out_filename))
-       {
                fprintf(stderr, "%s\n", PQerrorMessage(conn));
-       }
 
        res = PQexec(conn, "end");
        PQclear(res);
index 31607ba0f17d7dba1b565b53b9bf66c3b4d010a1..b00ee9c50995859cad7b5fcb2c86c8977ccda0af 100644 (file)
@@ -7,7 +7,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/test/examples/Attic/testlo2.c,v 1.7 1998/05/12 21:44:08 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/test/examples/Attic/testlo2.c,v 1.8 1998/06/15 19:30:31 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -49,9 +49,7 @@ importFile(PGconn *conn, char *filename)
         */
        lobjId = lo_creat(conn, INV_READ | INV_WRITE);
        if (lobjId == 0)
-       {
                fprintf(stderr, "can't create large object");
-       }
 
        lobj_fd = lo_open(conn, lobjId, INV_WRITE);
 
@@ -62,9 +60,7 @@ importFile(PGconn *conn, char *filename)
        {
                tmp = lo_write(conn, lobj_fd, buf, nbytes);
                if (tmp < nbytes)
-               {
                        fprintf(stderr, "error while reading \"%s\"", filename);
-               }
        }
 
        close(fd);