Fix comments that were mis-wrapped, for Tom Lane.
authorBruce Momjian <[email protected]>
Fri, 23 Mar 2001 04:49:58 +0000 (04:49 +0000)
committerBruce Momjian <[email protected]>
Fri, 23 Mar 2001 04:49:58 +0000 (04:49 +0000)
30 files changed:
contrib/spi/refint.c
src/backend/access/gist/gistscan.c
src/backend/access/hash/hashsearch.c
src/backend/access/heap/tuptoaster.c
src/backend/access/nbtree/nbtsearch.c
src/backend/access/nbtree/nbtutils.c
src/backend/commands/_deadcode/version.c
src/backend/commands/command.c
src/backend/executor/execQual.c
src/backend/executor/nodeLimit.c
src/backend/executor/nodeMergejoin.c
src/backend/optimizer/path/clausesel.c
src/backend/optimizer/path/indxpath.c
src/backend/rewrite/rewriteDefine.c
src/backend/storage/ipc/ipc.c
src/backend/storage/ipc/sinval.c
src/backend/utils/adt/formatting.c
src/backend/utils/adt/selfuncs.c
src/backend/utils/cache/lsyscache.c
src/backend/utils/cache/relcache.c
src/backend/utils/sort/tuplesort.c
src/bin/pg_dump/pg_backup_db.c
src/bin/pg_dump/pg_dump.c
src/bin/pg_dump/pg_dump.h
src/include/catalog/pg_type.h
src/include/nodes/parsenodes.h
src/interfaces/ecpg/lib/connect.c
src/interfaces/libpq/fe-connect.c
src/interfaces/odbc/info.c
src/interfaces/odbc/options.c

index ea8851816f5a2c9daed5577e76f6254b1ca01556..dcc9f54daf58b69d69382f91bf1ce90df65a8b6f 100644 (file)
@@ -399,19 +399,29 @@ check_foreign_key(PG_FUNCTION_ARGS)
                {
                        relname = args2[0];
 
-                       /*
-                        * For 'R'estrict action we construct SELECT query - SELECT 1
-                        * FROM _referencing_relation_ WHERE Fkey1 = $1 [AND Fkey2 =
-                        * $2 [...]] - to check is tuple referenced or not.
+                       /*---------
+                        * For 'R'estrict action we construct SELECT query:
+                        *
+                        *  SELECT 1
+                        *      FROM _referencing_relation_
+                        *      WHERE Fkey1 = $1 [AND Fkey2 = $2 [...]]
+                        *
+                        *  to check is tuple referenced or not.
+                        *---------
                         */
                        if (action == 'r')
 
                                sprintf(sql, "select 1 from %s where ", relname);
 
-                       /*
-                        * For 'C'ascade action we construct DELETE query - DELETE
-                        * FROM _referencing_relation_ WHERE Fkey1 = $1 [AND Fkey2 =
-                        * $2 [...]] - to delete all referencing tuples.
+                       /*---------
+                        * For 'C'ascade action we construct DELETE query
+                        *
+                        *      DELETE
+                        *      FROM _referencing_relation_
+                        *      WHERE Fkey1 = $1 [AND Fkey2 = $2 [...]]
+                        *
+                        * to delete all referencing tuples.
+                        *---------
                         */
 
                        /*
index ba21fee3c33ea834a7856dcfe0b4416cde6d387c..ea6114033e82b534aa56c738746ab9b5cb7ec948 100644 (file)
@@ -143,9 +143,10 @@ gistrescan(PG_FUNCTION_ARGS)
                        for (i = 0; i < s->numberOfKeys; i++)
                        {
 
-                               /*
+                               /*----------
                                 * s->keyData[i].sk_procedure =
-                                * index_getprocid(s->relation, 1, GIST_CONSISTENT_PROC);
+                                *              index_getprocid(s->relation, 1, GIST_CONSISTENT_PROC);
+                                *----------
                                 */
                                s->keyData[i].sk_procedure
                                        = RelationGetGISTStrategy(s->relation, s->keyData[i].sk_attno,
index d9b1c81ca4fc2c436d32a124da376e6b8fb8d8e5..25d8c744238525f6fd96692183cd2cd9ae366bef 100644 (file)
@@ -334,9 +334,11 @@ _hash_step(IndexScanDesc scan, Buffer *bufP, ScanDirection dir, Buffer metabuf)
                                while (offnum > maxoff)
                                {
 
-                                       /*
-                                        * either this page is empty (maxoff ==
-                                        * InvalidOffsetNumber) or we ran off the end.
+                                       /*--------
+                                        * either this page is empty
+                                        * (maxoff == InvalidOffsetNumber)
+                                        * or we ran off the end.
+                                        *--------
                                         */
                                        _hash_readnext(rel, &buf, &page, &opaque);
                                        if (BufferIsInvalid(buf))
@@ -382,9 +384,11 @@ _hash_step(IndexScanDesc scan, Buffer *bufP, ScanDirection dir, Buffer metabuf)
                                while (offnum < FirstOffsetNumber)
                                {
 
-                                       /*
-                                        * either this page is empty (offnum ==
-                                        * InvalidOffsetNumber) or we ran off the end.
+                                       /*---------
+                                        * either this page is empty
+                                        * (offnum == InvalidOffsetNumber)
+                                        * or we ran off the end.
+                                        *---------
                                         */
                                        _hash_readprev(rel, &buf, &page, &opaque);
                                        if (BufferIsInvalid(buf))
index b2976de54a18b3f1dbfcfd77c60d1d6f4839fae8..5b180d411f80a6f05410f41f363196e435f8d6e2 100644 (file)
@@ -458,9 +458,10 @@ toast_insert_or_update(Relation rel, HeapTuple newtup, HeapTuple oldtup)
                int32           biggest_size = MAXALIGN(sizeof(varattrib));
                Datum           old_value;
 
-               /*
-                * Search for the biggest yet inlined attribute with attstorage =
-                * 'x' or 'e'
+               /*------
+                * Search for the biggest yet inlined attribute with
+                * attstorage equals 'x' or 'e'
+                *------
                 */
                for (i = 0; i < numAttrs; i++)
                {
@@ -572,9 +573,10 @@ toast_insert_or_update(Relation rel, HeapTuple newtup, HeapTuple oldtup)
                int32           biggest_size = MAXALIGN(sizeof(varattrib));
                Datum           old_value;
 
-               /*
-                * Search for the biggest yet inlined attribute with attstorage =
-                * 'm'
+               /*--------
+                * Search for the biggest yet inlined attribute with
+                * attstorage = 'm'
+                *--------
                 */
                for (i = 0; i < numAttrs; i++)
                {
index d39dc714f0b757976f697f1dea348b4aafbdeb3e..0224829c217812a59c530647069f04f8cf3f18f6 100644 (file)
@@ -584,8 +584,10 @@ _bt_first(IndexScanDesc scan, ScanDirection dir)
 
        /*
         * At this point we are positioned at the first item >= scan key, or
-        * possibly at the end of a page on which all the existing items are <
-        * scan key and we know that everything on later pages is >= scan key.
+        * possibly at the end of a page on which all the existing items are 
+        * greater than the scan key and we know that everything on later pages
+        * is less than or equal to scan key.
+     *
         * We could step forward in the latter case, but that'd be a waste of
         * time if we want to scan backwards.  So, it's now time to examine
         * the scan strategy to find the exact place to start the scan.
index a478051c19b3bc5555ebcaedc9ba4a4e99c6f14f..a0f6003efc39f030dbe721446385cc38b248ddbe 100644 (file)
@@ -412,8 +412,8 @@ _bt_orderkeys(Relation relation, BTScanOpaque so)
                        if (DatumGetBool(test))
                                xform[j].sk_argument = cur->sk_argument;
                        else if (j == (BTEqualStrategyNumber - 1))
-                               so->qual_ok = false;    /* key == a && key == b, but a !=
-                                                                                * b */
+                               so->qual_ok = false;
+                       /* key == a && key == b, but a != b */
                }
                else
                {
index 160e5881dee0009a83a6720025012d1a2e0a24b2..4d2334b21fcee877bc5f5fdbfa1ace172949daf0 100644 (file)
@@ -77,9 +77,12 @@ static void
 eval_as_new_xact(char *query)
 {
 
-       /*
+       /*------
         * WARNING! do not uncomment the following lines WARNING!
-        * CommitTransactionCommand(); StartTransactionCommand();
+        *
+        *      CommitTransactionCommand();
+        *      StartTransactionCommand();
+        *------
         */
        CommandCounterIncrement();
        pg_exec_query(query);
index 5cf9f0ec6f7d4737c8c4b6d049394aa07e74ac17..6274971c8ffc4b3294ebcc06f83a28f0d81d0ca0 100644 (file)
@@ -1034,11 +1034,13 @@ AlterTableDropColumn(const char *relationName,
        ScanKeyEntryInitialize(&scankeys[0], 0x0, Anum_pg_attrdef_adrelid,
                                                   F_OIDEQ, ObjectIdGetDatum(myrelid));
 
-       /*
+       /*--------
         * Oops pg_attrdef doesn't have (adrelid,adnum) index
-        * ScanKeyEntryInitialize(&scankeys[1], 0x0, Anum_pg_attrdef_adnum,
-        * F_INT2EQ, Int16GetDatum(attnum)); sysscan =
-        * systable_beginscan(adrel, AttrDefaultIndex, 2, scankeys);
+        *
+        *      ScanKeyEntryInitialize(&scankeys[1], 0x0, Anum_pg_attrdef_adnum,
+        *                                                              F_INT2EQ, Int16GetDatum(attnum));
+        *      sysscan = systable_beginscan(adrel, AttrDefaultIndex, 2, scankeys);
+        *--------
         */
        sysscan = systable_beginscan(adrel, AttrDefaultIndex, 1, scankeys);
        while (HeapTupleIsValid(tup = systable_getnext(sysscan)))
index 6d4cfa77ab412e0ef59c5f2988697ade112a7fab..41c10f847f5dd15c5584b66c1f7c0652dcc7e94a 100644 (file)
@@ -1499,8 +1499,9 @@ ExecTargetList(List *targetlist,
         * and another array that holds the isDone status for each targetlist
         * item. The isDone status is needed so that we can iterate,
         * generating multiple tuples, when one or more tlist items return
-        * sets.  (We expect the caller to call us again if we return *isDone
-        * = ExprMultipleResult.)
+        * sets.  (We expect the caller to call us again if we return:
+        *
+        *      isDone = ExprMultipleResult.)
         */
        if (nodomains > NPREALLOCDOMAINS)
        {
index 44675d95cbd20ed7cda4c309ce863a90c45e58aa..7f0b3a246fa6a70f70383b1d0a1daab4b73ba89f 100644 (file)
@@ -79,8 +79,8 @@ ExecLimit(Limit *node)
                 * tuple in the offset region before we can return NULL.
                 * Otherwise we won't be correctly aligned to start going forward
                 * again.  So, although you might think we can quit when position
-                * = offset + 1, we have to fetch a subplan tuple first, and then
-                * exit when position = offset.
+                * equals offset + 1, we have to fetch a subplan tuple first, and
+                * then exit when position = offset.
                 */
                if (ScanDirectionIsForward(direction))
                {
index 8ca6880adcb1a22646cdba1e9ac6be6b05b060d7..40cc31e4ff1d972a944697a2506761cda041a77b 100644 (file)
@@ -240,10 +240,11 @@ MergeCompare(List *eqQual, List *compareQual, ExprContext *econtext)
                        break;
                }
 
-               /*
+               /*-----------
                 * ok, the compare clause failed so we test if the keys are
-                * equal... if key1 != key2, we return false. otherwise key1 =
-                * key2 so we move on to the next pair of keys.
+                * equal... if key1 != key2, we return false. otherwise
+                * key1 = key2 so we move on to the next pair of keys.
+                *-----------
                 */
                const_value = ExecEvalExpr((Node *) lfirst(eqclause),
                                                                   econtext,
index 1b6669a491679c2891d1821fdf32961116bd1a2c..2a553e46a71cc005fa8549c0b3dbb41c41b46608 100644 (file)
@@ -297,9 +297,11 @@ addRangeClause(RangeQueryClause **rqlist, Node *clause,
                        else
                        {
 
-                               /*
-                                * We have found two similar clauses, such as x < y AND x
-                                * < z.  Keep only the more restrictive one.
+                               /*------
+                                * We have found two similar clauses, such as
+                                * x < y AND x < z.
+                                * Keep only the more restrictive one.
+                                *------
                                 */
                                if (rqelem->lobound > s2)
                                        rqelem->lobound = s2;
@@ -315,9 +317,11 @@ addRangeClause(RangeQueryClause **rqlist, Node *clause,
                        else
                        {
 
-                               /*
-                                * We have found two similar clauses, such as x > y AND x
-                                * > z.  Keep only the more restrictive one.
+                               /*------
+                                * We have found two similar clauses, such as
+                                * x > y AND x > z.
+                                * Keep only the more restrictive one.
+                                *------
                                 */
                                if (rqelem->hibound > s2)
                                        rqelem->hibound = s2;
index 152e5565a86c539ed691b6d130b48a20408e686b..419fdb5a0096c97893ca98e047483415e69ccbf7 100644 (file)
@@ -1986,9 +1986,10 @@ prefix_quals(Var *leftop, Oid expr_op,
        expr = make_opclause(op, leftop, (Var *) con);
        result = makeList1(expr);
 
-       /*
-        * If we can create a string larger than the prefix, we can say "x <
-        * greaterstr".
+       /*-------
+        * If we can create a string larger than the prefix, we can say
+        * "x < greaterstr".
+        *-------
         */
        greaterstr = make_greater_string(prefix, datatype);
        if (greaterstr)
index ad0d405842442f301b85a5cbc1f6ed46fe75c303..468c5307e396bc14df61d8d0fa8c4acb7e610a69 100644 (file)
@@ -130,10 +130,14 @@ ValidateRule(int event_type,
 
 #ifdef NOT_USED
 
-       /*
+       /*---------
         * on retrieve to class.attribute do instead nothing is converted to
-        * 'on retrieve to class.attribute do instead retrieve (attribute =
-        * NULL)' --- this is also a terrible hack that works well -- glass
+        * 'on retrieve to class.attribute do instead:
+        *
+        *       retrieve (attribute = NULL)'
+        *
+        * this is also a terrible hack that works well -- glass
+        *---------
         */
        if (is_instead && !*action && eslot_string && event_type == CMD_SELECT)
        {
index b74b537a79b692e7c300e6bb0dc3a8f10337caff..154298be3892f40d0623d12fd2c447266d993ad9 100644 (file)
@@ -404,7 +404,7 @@ IpcSemaphoreLock(IpcSemaphoreId semId, int sem, bool interruptOK)
         * and entering the semop() call.  If a cancel/die interrupt occurs in
         * that window, we would fail to notice it until after we acquire the
         * lock (or get another interrupt to escape the semop()).  We can
-        * avoid this problem by temporarily setting ImmediateInterruptOK =
+        * avoid this problem by temporarily setting ImmediateInterruptOK to
         * true before we do CHECK_FOR_INTERRUPTS; then, a die() interrupt in
         * this interval will execute directly.  However, there is a huge
         * pitfall: there is another window of a few instructions after the
index ed85177697cabf26132914b0fa23de21d62f19ab..d6730a1bdf6c935f865f628b55a943ef4f4c1fd6 100644 (file)
@@ -319,11 +319,13 @@ GetSnapshotData(bool serializable)
                                xid < FirstTransactionId || xid >= snapshot->xmax)
                        {
 
-                               /*
-                                * Seems that there is no sense to store xid >=
-                                * snapshot->xmax (what we got from ReadNewTransactionId
-                                * above) in snapshot->xip - we just assume that all xacts
+                               /*--------
+                                * Seems that there is no sense to store
+                                *              xid >= snapshot->xmax
+                                * (what we got from ReadNewTransactionId above)
+                                * in snapshot->xip.  We just assume that all xacts
                                 * with such xid-s are running and may be ignored.
+                                *--------
                                 */
                                continue;
                        }
index a472da385306907395dd77faaaf6b7152eb3c0db..d2c3ca19389b692dc2354923db108731d87fc41d 100644 (file)
@@ -2846,9 +2846,11 @@ to_timestamp(PG_FUNCTION_ARGS)
        else if (tmfc->yy)
        {
 
-               /*
-                * 2-digit year: '00' ... '69'  = 2000 ... 2069 '70' ... '99'  =
-                * 1970 ... 1999
+               /*---------
+                * 2-digit year:
+                * '00' ... '69'  = 2000 ... 2069
+                * '70' ... '99'  = 1970 ... 1999
+                *---------
                 */
                tm->tm_year = tmfc->yy;
 
@@ -2860,9 +2862,11 @@ to_timestamp(PG_FUNCTION_ARGS)
        else if (tmfc->yyy)
        {
 
-               /*
-                * 3-digit year: '100' ... '999' = 1100 ... 1999 '000' ... '099' =
-                * 2000 ... 2099
+               /*---------
+                * 3-digit year:
+                *      '100' ... '999' = 1100 ... 1999
+                *      '000' ... '099' = 2000 ... 2099
+                *---------
                 */
                tm->tm_year = tmfc->yyy;
 
index afd6608025b04285072ab2a11c66c5b8d6c5e6f6..b55b338332263f623bddfe92154c4a009265566a 100644 (file)
@@ -1642,9 +1642,10 @@ prefix_selectivity(char *prefix,
                                                           Int32GetDatum(SEL_CONSTANT | SEL_RIGHT)));
        pfree(DatumGetPointer(prefixcon));
 
-       /*
-        * If we can create a string larger than the prefix, say "x <
-        * greaterstr".
+       /*-------
+        * If we can create a string larger than the prefix, say
+        *      "x < greaterstr".
+        *-------
         */
        greaterstr = make_greater_string(prefix, datatype);
        if (greaterstr)
index 3182fd4ad0bd41bef57f636014d138cdb4c0405c..248c14dfa65f1353c573514b2310795705f78d70 100644 (file)
@@ -272,7 +272,7 @@ get_attdispersion(Oid relid, AttrNumber attnum, double min_estimate)
 
        /*
         * VACUUM ANALYZE has not been run for this table. Produce an estimate
-        * = 1/numtuples.  This may produce unreasonably small estimates for
+        * of 1/numtuples.  This may produce unreasonably small estimates for
         * large tables, so limit the estimate to no less than min_estimate.
         */
        dispersion = 1.0 / (double) ntuples;
index 0bc8d7958032081b62c4b3717ecd871834b97b87..acb7cf29aae02a2ff7c8a88d69b02f8afe9e90a3 100644 (file)
@@ -2833,11 +2833,14 @@ write_irels(void)
         * the descriptors, nail them into cache so we never lose them.
         */
 
-       /*
-        * Removed the following ProcessingMode change -- inoue At this point
-        * 1) Catalog Cache isn't initialized 2) Relation Cache for the
-        * following critical indexes aren't built oldmode =
-        * GetProcessingMode(); SetProcessingMode(BootstrapProcessing);
+       /*---------
+        * Removed the following ProcessingMode change -- inoue
+        * At this point
+        * 1) Catalog Cache isn't initialized
+        * 2) Relation Cache for the following critical indexes aren't built
+        * oldmode = GetProcessingMode();
+        * SetProcessingMode(BootstrapProcessing);
+        *---------
         */
 
        bi.infotype = INFO_RELNAME;
index 80c869985ae26e60a645dd4cc60e35d2f06691d9..9425f2ec3572419d166df81bbaac862a2aabea8d 100644 (file)
@@ -129,8 +129,10 @@ struct Tuplesortstate
         * kind of tuple we are sorting from the routines that don't need to
         * know it. They are set up by the tuplesort_begin_xxx routines.
         *
-        * Function to compare two tuples; result is per qsort() convention, ie,
-        * <0, 0, >0 according as a<b, a=b, a>b.
+        * Function to compare two tuples; result is per qsort() convention,
+        * ie:
+        *
+        *      <0, 0, >0 according as a<b, a=b, a>b.
         */
        int                     (*comparetup) (Tuplesortstate *state, const void *a, const void *b);
 
index a7515455ff84f3ff7c4e91e7727f7c5fa37722e0..4175e4e26a85287c1f22c9ab857108370e85d2c7 100644 (file)
@@ -473,9 +473,10 @@ ExecuteSqlCommandBuf(ArchiveHandle *AH, void *qryv, int bufLen)
                                qry += loc + 1;
                                isEnd = (strcmp(AH->pgCopyBuf->data, "\\.\n") == 0);
 
-                               /*
-                                * fprintf(stderr, "Sending '%s' via COPY (at end =
-                                * %d)\n\n", AH->pgCopyBuf->data, isEnd);
+                               /*---------
+                                * fprintf(stderr, "Sending '%s' via
+                                *              COPY (at end = %d)\n\n", AH->pgCopyBuf->data, isEnd);
+                                *---------
                                 */
 
                                if (PQputline(AH->connection, AH->pgCopyBuf->data) != 0)
index aa3d5857d5ed4986fa60710517bff8bbb241f8a0..2b59db7100da80aae04324df66ea88c0d9d06121 100644 (file)
@@ -4405,8 +4405,10 @@ dumpSequence(Archive *fout, TableInfo tbinfo, const bool schemaOnly, const bool
        /*
         * The logic we use for restoring sequences is as follows: -   Add a
         * basic CREATE SEQUENCE statement (use last_val for start if called
-        * == 'f', else use min_val for start_val). -   Add a 'SETVAL(seq,
-        * last_val, iscalled)' at restore-time iff we load data
+        * with 'f', else use min_val for start_val).
+        *
+        *      Add a 'SETVAL(seq, last_val, iscalled)' at restore-time iff
+        *  we load data
         */
 
        if (!dataOnly)
index 2d63dbd6bda8da607857b02e471533c566b119e6..cff1914a66681e1099b5c7fe4473db458dc97fb4 100644 (file)
@@ -158,8 +158,12 @@ typedef struct _oprInfo
 {
        char       *oid;
        char       *oprname;
-       char       *oprkind;            /* "b" = binary, "l" = left unary, "r" =
-                                                                * right unary */
+       char       *oprkind;            /*----------
+                                                                *      b = binary,
+                                                                *      l = left unary
+                                                                *      r = right unary
+                                                                *----------
+                                                                */
        char       *oprcode;            /* operator function name */
        char       *oprleft;            /* left operand type */
        char       *oprright;           /* right operand type */
index 59be388014c8ed12d6975f13b7dcd5641b8569ae..2a9c728e8ebaf3f7548a5605068ead0b1b7ed6f5 100644 (file)
@@ -77,8 +77,9 @@ CATALOG(pg_type) BOOTSTRAP
         * be a "real" array type; some ordinary fixed-length types can also
         * be subscripted (e.g., oidvector). Variable-length types can *not*
         * be turned into pseudo-arrays like that. Hence, the way to determine
-        * whether a type is a "true" array type is typelem != 0 and typlen <
-        * 0.
+        * whether a type is a "true" array type is if:
+        *
+        *      typelem != 0 and typlen < 0.
         */
        Oid                     typelem;
        regproc         typinput;
index 46932506ddc1220f55761414976db0c5e0aa27fa..9d394b2abb2665706818649ae003a73edbb918a8 100644 (file)
@@ -116,10 +116,16 @@ typedef enum InhOption
 typedef struct AlterTableStmt
 {
        NodeTag         type;
-       char            subtype;                /* A = add column, T = alter column, D =
-                                                                * drop column, C = add constraint, X =
-                                                                * drop constraint, E = add toast table, U
-                                                                * = change owner */
+       char            subtype;                /*------------
+                                                                *      A = add column
+                                                                *      T = alter column
+                                                                *      D = drop column
+                                                                *      C = add constraint
+                                                                *      X = drop constraint
+                                                                *      E = add toast table,
+                                                                *      U = change owner
+                                                                *------------
+                                                                */
        char       *relname;            /* table to work on */
        InhOption       inhOpt;                 /* recursively act on children? */
        char       *name;                       /* column or constraint name to act on, or
index eac4fcc028ec6f8e3e10003a8f29ac8109da67da..5dc05ea7402b84ddd5cf8e2a9028936787287a34 100644 (file)
@@ -307,10 +307,11 @@ ECPGconnect(int lineno, const char *name, const char *user, const char *passwd,
                if (strncmp(dbname + offset, "postgresql://", strlen("postgresql://")) == 0)
                {
 
-                       /*
+                       /*------
                         * new style:
-                        * <tcp|unix>:postgresql://server[:port|:/unixsocket/path:][/db
-                        * name][?options]
+                        *      <tcp|unix>:postgresql://server[:port|:/unixsocket/path:]
+                        *      [/db name][?options]
+                        *------
                         */
                        offset += strlen("postgresql://");
 
index dcb8f520565ec17f35ee30a9faf919124caa8a39..a4934e601c923d594b00fad640799af1029088d9 100644 (file)
@@ -582,10 +582,11 @@ update_db_info(PGconn *conn)
                if (strncmp(conn->dbName + offset, "postgresql://", strlen("postgresql://")) == 0)
                {
 
-                       /*
+                       /*-------
                         * new style:
-                        * <tcp|unix>:postgresql://server[:port|:/unixsocket/path:][/db
-                        * name][?options]
+                        *      <tcp|unix>:postgresql://server[:port|:/unixsocket/path:]
+                        *      [/db name][?options]
+                        *-------
                         */
                        offset += strlen("postgresql://");
 
index 764cb3a58890552d1688910d0eff46ccb2a8cb36..e14a9d67ac982e60df48e8938c5b23a71c7df294 100644 (file)
@@ -1738,17 +1738,18 @@ SQLColumns(
                set_tuplefield_string(&row->tuple[5], field_type_name);
 
 
-               /*
+               /*----------
                 * Some Notes about Postgres Data Types:
                 *
                 * VARCHAR - the length is stored in the pg_attribute.atttypmod field
                 * BPCHAR  - the length is also stored as varchar is
                 *
-                * NUMERIC - the scale is stored in atttypmod as follows: precision =
-                * ((atttypmod - VARHDRSZ) >> 16) & 0xffff scale         = (atttypmod
-                * - VARHDRSZ) & 0xffff
+                * NUMERIC - the scale is stored in atttypmod as follows:
                 *
+                *      precision =((atttypmod - VARHDRSZ) >> 16) & 0xffff
+                *      scale    = (atttypmod - VARHDRSZ) & 0xffff
                 *
+                *----------
                 */
                qlog("SQLColumns: table='%s',field_name='%s',type=%d,sqltype=%d,name='%s'\n",
                         table_name, field_name, field_type, pgtype_to_sqltype, field_type_name);
index 3dc3a40c7deeed28f9937c13517d485b7b4b477a..85844ede3bc3071b93cef05f90c3547796ff55d0 100644 (file)
@@ -81,16 +81,27 @@ set_statement_option(ConnectionClass *conn,
                                stmt->options.scroll_concurrency = vParam;
                        break;
 
-                       /*
-                        * if (globals.lie) { if (conn)
-                        * conn->stmtOptions.scroll_concurrency = vParam; if (stmt)
-                        * stmt->options.scroll_concurrency = vParam; } else {
-                        *
-                        * if (conn) conn->stmtOptions.scroll_concurrency =
-                        * SQL_CONCUR_READ_ONLY; if (stmt)
-                        * stmt->options.scroll_concurrency = SQL_CONCUR_READ_ONLY;
+                       /*----------
+                        * if (globals.lie)
+                        * {
+                        *              if (conn)
+                        *                      conn->stmtOptions.scroll_concurrency = vParam;
+                        *              if (stmt)
+                        *                      stmt->options.scroll_concurrency = vParam;
+                        *              } else {
+                        *                      if (conn)
+                        *                              conn->stmtOptions.scroll_concurrency =
+                        *                                      SQL_CONCUR_READ_ONLY;
+                        *                      if (stmt)
+                        *                              stmt->options.scroll_concurrency =
+                        *                                      SQL_CONCUR_READ_ONLY;
                         *
-                        * if (vParam != SQL_CONCUR_READ_ONLY) changed = TRUE; } break;
+                        *                      if (vParam != SQL_CONCUR_READ_ONLY)
+                        *                              changed = TRUE;
+                        *              }
+                        *              break;
+                        *      }
+                        *----------
                         */
 
                case SQL_CURSOR_TYPE: