Fix inconsistencies and typos in the tree, take 9
authorMichael Paquier <michael@paquier.xyz>
Mon, 5 Aug 2019 03:14:58 +0000 (12:14 +0900)
committerMichael Paquier <michael@paquier.xyz>
Mon, 5 Aug 2019 03:14:58 +0000 (12:14 +0900)
This addresses more issues with code comments, variable names and
unreferenced variables.

Author: Alexander Lakhin
Discussion: https://postgr.es/m/7ab243e0-116d-3e44-d120-76b3df7abefd@gmail.com

80 files changed:
contrib/pg_standby/pg_standby.c
contrib/pgcrypto/pgp-pgsql.c
contrib/pgcrypto/px.h
contrib/pgcrypto/sha1.c
contrib/postgres_fdw/postgres_fdw.c
contrib/sepgsql/sepgsql.h
contrib/test_decoding/test_decoding.c
doc/src/sgml/libpq.sgml
doc/src/sgml/ref/set_role.sgml
doc/src/sgml/sslinfo.sgml
src/backend/access/gin/README
src/backend/access/gin/ginbtree.c
src/backend/access/gist/gistget.c
src/backend/access/hash/hash_xlog.c
src/backend/access/hash/hashinsert.c
src/backend/access/heap/heapam.c
src/backend/access/heap/visibilitymap.c
src/backend/access/nbtree/nbtsort.c
src/backend/access/transam/README
src/backend/access/transam/clog.c
src/backend/access/transam/multixact.c
src/backend/catalog/aclchk.c
src/backend/catalog/information_schema.sql
src/backend/catalog/objectaddress.c
src/backend/commands/copy.c
src/backend/commands/define.c
src/backend/commands/prepare.c
src/backend/commands/vacuum.c
src/backend/executor/nodeWindowAgg.c
src/backend/libpq/pqcomm.c
src/backend/nodes/params.c
src/backend/nodes/tidbitmap.c
src/backend/optimizer/geqo/geqo_selection.c
src/backend/optimizer/plan/planner.c
src/backend/parser/parse_oper.c
src/backend/postmaster/pgstat.c
src/backend/regex/regcomp.c
src/backend/replication/logical/reorderbuffer.c
src/backend/storage/ipc/procarray.c
src/backend/storage/ipc/shm_mq.c
src/backend/storage/lmgr/lock.c
src/backend/storage/lmgr/predicate.c
src/backend/utils/adt/genfile.c
src/backend/utils/adt/ruleutils.c
src/backend/utils/mmgr/slab.c
src/backend/utils/time/snapmgr.c
src/bin/initdb/initdb.c
src/bin/pg_dump/pg_dump.h
src/bin/pg_dump/pg_restore.c
src/bin/pg_resetwal/pg_resetwal.c
src/bin/psql/describe.h
src/common/unicode/norm_test.c
src/include/access/commit_ts.h
src/include/access/gin_private.h
src/include/access/hash.h
src/include/access/nbtxlog.h
src/include/access/xloginsert.h
src/include/catalog/catversion.h
src/include/commands/extension.h
src/include/commands/tablecmds.h
src/include/executor/execExpr.h
src/include/mb/pg_wchar.h
src/include/parser/parse_func.h
src/include/port/atomics.h
src/include/storage/itemptr.h
src/include/storage/off.h
src/include/storage/proc.h
src/include/utils/jsonapi.h
src/interfaces/ecpg/ecpglib/execute.c
src/interfaces/ecpg/pgtypeslib/datetime.c
src/interfaces/libpq/fe-connect.c
src/interfaces/libpq/fe-exec.c
src/interfaces/libpq/fe-misc.c
src/interfaces/libpq/libpq-fe.h
src/interfaces/libpq/libpq-int.h
src/pl/plpgsql/src/pl_comp.c
src/pl/plpgsql/src/plpgsql.h
src/pl/plpython/plpy_procedure.c
src/test/isolation/Makefile
src/tools/msvc/Project.pm

index 23f706b21da26024f6c858134376a0210d852780..031b1b5cd5846263e7fbb28f52cec7308c9bdf39 100644 (file)
@@ -58,7 +58,6 @@ char     *triggerPath;                /* where to find the trigger file? */
 char      *xlogFilePath;               /* where we are going to restore to */
 char      *nextWALFileName;    /* the file we need to get from archive */
 char      *restartWALFileName; /* the file from which we can restart restore */
-char      *priorWALFileName;   /* the file we need to get from archive */
 char           WALFilePath[MAXPGPATH * 2]; /* the file path including archive */
 char           restoreCommand[MAXPGPATH];      /* run this to restore */
 char           exclusiveCleanupFileName[MAXFNAMELEN];  /* the file we need to get
index 0984e01a14b82452a4f89270c691020cdf684421..3feadf7b702ab75da316c79110854f53c1637e4f 100644 (file)
@@ -761,7 +761,7 @@ pgp_pub_decrypt_text(PG_FUNCTION_ARGS)
  */
 
 /*
- * Helper function for pgp_armor. Converts arrays of keys and values into
+ * Helper function for pg_armor. Converts arrays of keys and values into
  * plain C arrays, and checks that they don't contain invalid characters.
  */
 static int
index cef9c4b45650a5831ad36cc8418587924615b380..0d4722a04a0a40c9a85ae1ef770e88307d8450be 100644 (file)
@@ -50,9 +50,6 @@ void     *px_realloc(void *p, size_t s);
 void           px_free(void *p);
 #endif
 
-/* max len of 'type' parms */
-#define PX_MAX_NAMELEN         128
-
 /* max salt returned */
 #define PX_MAX_SALT_LEN                128
 
index fb6a57d917c6e538b61a5ddf930a5b72fce39765..64671ac64d9a596abbb8216fd7bd34f32cebfbae 100644 (file)
@@ -59,16 +59,6 @@ static uint32 _K[] = {0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6};
 #define BCOUNT (ctxt->c.b64[0] / 8)
 #define W(n)   (ctxt->m.b32[(n)])
 
-#define PUTBYTE(x) \
-do { \
-       ctxt->m.b8[(COUNT % 64)] = (x);         \
-       COUNT++;                                \
-       COUNT %= 64;                            \
-       ctxt->c.b64[0] += 8;                    \
-       if (COUNT % 64 == 0)                    \
-               sha1_step(ctxt);                \
-} while (0)
-
 #define PUTPAD(x) \
 do { \
        ctxt->m.b8[(COUNT % 64)] = (x);         \
index 033aeb2556e188a5e4fa4c7f3d1933828d2fc579..06a205877d7c32e5f45efe502709bf4046c575f5 100644 (file)
@@ -2794,7 +2794,7 @@ estimate_path_cost_size(PlannerInfo *root,
 
                        /*
                         * Back into an estimate of the number of retrieved rows.  Just in
-                        * case this is nuts, clamp to at most nrow.
+                        * case this is nuts, clamp to at most nrows.
                         */
                        retrieved_rows = clamp_row_est(rows / fpinfo->local_conds_sel);
                        retrieved_rows = Min(retrieved_rows, nrows);
index 7197e3cdf030726e38652ee310823bc44394b413..4787934650aa3572779834599202c1b36bcb1621 100644 (file)
@@ -271,7 +271,7 @@ extern void sepgsql_avc_init(void);
  */
 extern char *sepgsql_get_client_label(void);
 extern void sepgsql_init_client_label(void);
-extern char *sepgsql_get_label(Oid relOid, Oid objOid, int32 subId);
+extern char *sepgsql_get_label(Oid classId, Oid objectId, int32 subId);
 
 extern void sepgsql_object_relabel(const ObjectAddress *object,
                                                                   const char *seclabel);
index a0ded67b9aa50b3f2a372f13600dedbc8426d01a..6c33c4bdedb2e66f9f732bae2ac10b2fce51d42e 100644 (file)
@@ -24,7 +24,7 @@
 
 PG_MODULE_MAGIC;
 
-/* These must be available to pg_dlsym() */
+/* These must be available to dlsym() */
 extern void _PG_init(void);
 extern void _PG_output_plugin_init(OutputPluginCallbacks *cb);
 
index ef2e97afd12d1fee5de91a981f91c207fe4aa0c5..e7295abda282af3cfbe0607ab6e65b540df65e7e 100644 (file)
@@ -5509,7 +5509,7 @@ int PQendcopy(PGconn *conn);
        It should either be issued when the  last  string  has  been sent
        to  the  server using <xref linkend="libpq-PQputline"/> or when the
        last string has been  received  from  the  server using
-       <function>PGgetline</function>.  It must be issued or the server
+       <function>PQgetline</function>.  It must be issued or the server
        will get <quote>out of sync</quote> with  the client.   Upon return
        from this function, the server is ready to receive the next SQL
        command.  The return value is 0  on  successful  completion,
index 0ef6eb9a9c1eb0cc170ade18595684f5ea458004..9ab0d6af04cb64a5ca6f77ad8bec275da4876453 100644 (file)
@@ -70,7 +70,7 @@ RESET ROLE
    effectively drops all the privileges assigned directly to the session user
    and to the other roles it is a member of, leaving only the privileges
    available to the named role.  On the other hand, if the session user role
-   has the <literal>NOINHERITS</literal> attribute, <command>SET ROLE</command> drops the
+   has the <literal>NOINHERIT</literal> attribute, <command>SET ROLE</command> drops the
    privileges assigned directly to the session user and instead acquires the
    privileges available to the named role.
   </para>
index 0fde0fc10e098fd757f2daffc029ad23c7f51935..78ff83d6422523d30b4a5efd84e2174b8b3542c6 100644 (file)
@@ -185,7 +185,7 @@ countryName (alias C)
 localityName (alias L)
 stateOrProvinceName (alias ST)
 organizationName (alias O)
-organizationUnitName (alias OU)
+organizationalUnitName (alias OU)
 title
 description
 initials
index 838fdc0d63065020c40fd1c37e7da7e811c378d5..76c12ae2f6b30e54261600f54539cb76b3f53b5d 100644 (file)
@@ -270,7 +270,7 @@ is stored in the higher bits. That requires 43 bits in total, which
 conveniently fits in at most 6 bytes.
 
 A compressed posting list is passed around and stored on disk in a
-PackedPostingList struct. The first item in the list is stored uncompressed
+GinPostingList struct. The first item in the list is stored uncompressed
 as a regular ItemPointerData, followed by the length of the list in bytes,
 followed by the packed items.
 
index 11a8ed7bbc29512b77f15fc9f2524eb78eb5cabc..4c29261256a27bffacda6cd9bad377b7931fb60f 100644 (file)
@@ -650,7 +650,7 @@ ginPlaceToPage(GinBtree btree, GinBtreeStack *stack,
        }
        else
        {
-               elog(ERROR, "invalid return code from GIN placeToPage method: %d", rc);
+               elog(ERROR, "invalid return code from GIN beginPlaceToPage method: %d", rc);
                result = false;                 /* keep compiler quiet */
        }
 
index 4e0c500a22e093e764b27b4931af82f9445e37e4..95ac35e3bb3c7a4593aab156fe534b23c98a2c23 100644 (file)
@@ -74,7 +74,7 @@ gistkillitems(IndexScanDesc scan)
 
        /*
         * Mark all killedItems as dead. We need no additional recheck, because,
-        * if page was modified, pageLSN must have changed.
+        * if page was modified, curPageLSN must have changed.
         */
        for (i = 0; i < so->numKilled; i++)
        {
@@ -379,11 +379,11 @@ gistScanPage(IndexScanDesc scan, GISTSearchItem *pageItem, double *myDistances,
 
        /*
         * Check if the page was deleted after we saw the downlink. There's
-        * nothing of interest on a deleted page. Note that we must do this
-        * after checking the NSN for concurrent splits! It's possible that
-        * the page originally contained some tuples that are visible to us,
-        * but was split so that all the visible tuples were moved to another
-        * page, and then this page was deleted.
+        * nothing of interest on a deleted page. Note that we must do this after
+        * checking the NSN for concurrent splits! It's possible that the page
+        * originally contained some tuples that are visible to us, but was split
+        * so that all the visible tuples were moved to another page, and then
+        * this page was deleted.
         */
        if (GistPageIsDeleted(page))
        {
index d7b70981101430d8c9d60bb8778256c6e1a0bc87..86e7210acb8bca4502faf9680257ea5fcf68dbe1 100644 (file)
@@ -706,7 +706,7 @@ hash_xlog_squeeze_page(XLogReaderState *record)
 
                /*
                 * if the page on which are adding tuples is a page previous to freed
-                * overflow page, then update its nextblno.
+                * overflow page, then update its nextblkno.
                 */
                if (xldata->is_prev_bucket_same_wrt)
                {
index 5321762d5ea9993ead629eb3c5eacfd50ec8882e..89876d2ccd0b239d6124330eb86c5b981b22993f 100644 (file)
@@ -257,8 +257,8 @@ restart_insert:
  *     _hash_pgaddtup() -- add a tuple to a particular page in the index.
  *
  * This routine adds the tuple to the page as requested; it does not write out
- * the page.  It is an error to call pgaddtup() without pin and write lock on
- * the target buffer.
+ * the page.  It is an error to call this function without pin and write lock
+ * on the target buffer.
  *
  * Returns the offset number at which the tuple was inserted.  This function
  * is responsible for preserving the condition that tuples in a hash index
index 94309949fac3380a4f8a58617ccb7d2403b9d448..e33f019939d3398cb336d4fe9134e706b212ebf3 100644 (file)
@@ -74,7 +74,7 @@ static HeapTuple heap_prepare_insert(Relation relation, HeapTuple tup,
                                                                         TransactionId xid, CommandId cid, int options);
 static XLogRecPtr log_heap_update(Relation reln, Buffer oldbuf,
                                                                  Buffer newbuf, HeapTuple oldtup,
-                                                                 HeapTuple newtup, HeapTuple old_key_tup,
+                                                                 HeapTuple newtup, HeapTuple old_key_tuple,
                                                                  bool all_visible_cleared, bool new_all_visible_cleared);
 static Bitmapset *HeapDetermineModifiedColumns(Relation relation,
                                                                                           Bitmapset *interesting_cols,
index 64dfe06b261f04c120e283098bd0527b04389203..a08922b079869215f90f7d3c7b77b20d03b2a9a8 100644 (file)
 
 /* prototypes for internal routines */
 static Buffer vm_readbuf(Relation rel, BlockNumber blkno, bool extend);
-static void vm_extend(Relation rel, BlockNumber nvmblocks);
+static void vm_extend(Relation rel, BlockNumber vm_nblocks);
 
 
 /*
index d0b9013caf401ae9529d604e60ee735a725c1fac..b30cf9e9898aca3608192cc4d81f7c122da7ef87 100644 (file)
@@ -657,7 +657,7 @@ _bt_blwritepage(BTWriteState *wstate, Page page, BlockNumber blkno)
        /* XLOG stuff */
        if (wstate->btws_use_wal)
        {
-               /* We use the heap NEWPAGE record type for this */
+               /* We use the XLOG_FPI record type for this */
                log_newpage(&wstate->index->rd_node, MAIN_FORKNUM, blkno, page, true);
        }
 
index ad4083eb6b5e81eb9543b8afed5a49fd7f7b6647..b5a2cb2de8357f41774e3e1aa33e60ee105fedcd 100644 (file)
@@ -530,7 +530,7 @@ void XLogResetInsertion(void)
     construction workspace.  This is only needed if you have already called
     XLogBeginInsert(), but decide to not insert the record after all.
 
-void XLogEnsureRecordSpace(int max_block_id, int nrdatas)
+void XLogEnsureRecordSpace(int max_block_id, int ndatas)
 
     Normally, the WAL record construction buffers have the following limits:
 
index 34c74d96f8e22fe16f1abcfb9aa8f24a6078eec8..595c860aaaf9d070572fb3998c05dbfd9116fdc9 100644 (file)
@@ -92,7 +92,7 @@ static int    ZeroCLOGPage(int pageno, bool writeXlog);
 static bool CLOGPagePrecedes(int page1, int page2);
 static void WriteZeroPageXlogRec(int pageno);
 static void WriteTruncateXlogRec(int pageno, TransactionId oldestXact,
-                                                                Oid oldestXidDb);
+                                                                Oid oldestXactDb);
 static void TransactionIdSetPageStatus(TransactionId xid, int nsubxids,
                                                                           TransactionId *subxids, XidStatus status,
                                                                           XLogRecPtr lsn, int pageno,
index 2e169dd3f92e1933bf9c8185ebfd1a40ae5da7e3..7b2448e05bab3c517edf7257cba3543e56ed398a 100644 (file)
@@ -282,7 +282,7 @@ typedef struct MultiXactStateData
 } MultiXactStateData;
 
 /*
- * Last element of OldestMemberMXactID and OldestVisibleMXactId arrays.
+ * Last element of OldestMemberMXactId and OldestVisibleMXactId arrays.
  * Valid elements are (1..MaxOldestSlot); element 0 is never used.
  */
 #define MaxOldestSlot  (MaxBackends + max_prepared_xacts)
index 291412e305bb5c5a50a7d044a76e8ec25a123384..88ce37c08de4adc691e275c32bbef8f5df80d6fb 100644 (file)
@@ -4114,7 +4114,7 @@ pg_largeobject_aclmask_snapshot(Oid lobj_oid, Oid roleid,
                return mask;
 
        /*
-        * Get the largeobject's ACL from pg_language_metadata
+        * Get the largeobject's ACL from pg_largeobject_metadata
         */
        pg_lo_meta = table_open(LargeObjectMetadataRelationId,
                                                        AccessShareLock);
index 9c21ac7c6290b7bed32388466f8a8ee2aede3dae..c42e76ea894bd1a3b5063d2d2b8c1c14dc7c0449 100644 (file)
@@ -48,10 +48,6 @@ CREATE FUNCTION _pg_expandarray(IN anyarray, OUT x anyelement, OUT n int)
                                         pg_catalog.array_upper($1,1),
                                         1) as g(s)';
 
-CREATE FUNCTION _pg_keysequal(smallint[], smallint[]) RETURNS boolean
-    LANGUAGE sql IMMUTABLE PARALLEL SAFE  -- intentionally not STRICT, to allow inlining
-    AS 'select $1 operator(pg_catalog.<@) $2 and $2 operator(pg_catalog.<@) $1';
-
 /* Given an index's OID and an underlying-table column number, return the
  * column's position in the index (NULL if not there) */
 CREATE FUNCTION _pg_index_position(oid, smallint) RETURNS int
index caf48cefa9820968e9d173f64ff5dca7370aa0c4..ce8a4e927da7452aede1f83a252d4734e39bbc0c 100644 (file)
@@ -530,7 +530,7 @@ static const ObjectPropertyType ObjectProperty[] =
 
 /*
  * This struct maps the string object types as returned by
- * getObjectTypeDescription into ObjType enum values.  Note that some enum
+ * getObjectTypeDescription into ObjectType enum values.  Note that some enum
  * values can be obtained by different names, and that some string object types
  * do not have corresponding values in the output enum.  The user of this map
  * must be careful to test for invalid values being returned.
index 4f04d122c3041ebfd6df07e685defc66a275d153..3aeef30b281546e0ef6a2baf4b46f2775217160d 100644 (file)
@@ -176,7 +176,6 @@ typedef struct CopyStateData
         * Working state for COPY FROM
         */
        AttrNumber      num_defaults;
-       FmgrInfo        oid_in_function;
        FmgrInfo   *in_functions;       /* array of input functions for each attrs */
        Oid                *typioparams;        /* array of element types for in_functions */
        int                *defmap;                     /* array of default att numbers */
index b6c618aa00f7ae11812cd2e2c5da5d4604b94546..9c93e415f1499bce66bbcf2682e800beb2ba090f 100644 (file)
@@ -139,7 +139,7 @@ defGetBoolean(DefElem *def)
 
                                /*
                                 * The set of strings accepted here should match up with the
-                                * grammar's opt_boolean production.
+                                * grammar's opt_boolean_or_string production.
                                 */
                                if (pg_strcasecmp(sval, "true") == 0)
                                        return true;
index c12b6137633902cb4ff0338ec19bb01e0331ad04..7e0a041fabfdb12c3d23c3f9208d60e7dfcca481 100644 (file)
@@ -143,7 +143,7 @@ PrepareQuery(PrepareStmt *stmt, const char *queryString,
        }
 
        /*
-        * grammar only allows OptimizableStmt, so this check should be redundant
+        * grammar only allows PreparableStmt, so this check should be redundant
         */
        switch (query->commandType)
        {
index e7b379dfda1007b06c31914884c71ca6146f4dfc..046bb04732109aaa3e410b729df85597de599330 100644 (file)
@@ -847,7 +847,7 @@ get_all_vacuum_rels(int options)
 }
 
 /*
- * vacuum_set_xid_limits() -- compute oldest-Xmin and freeze cutoff points
+ * vacuum_set_xid_limits() -- compute oldestXmin and freeze cutoff points
  *
  * The output parameters are:
  * - oldestXmin is the cutoff value used to distinguish whether tuples are
index def00cd7c5fdf9d4663319e347434850775de0b5..cb81357304474ebaec92fb090ab53a65949b1cb1 100644 (file)
@@ -93,7 +93,7 @@ typedef struct WindowStatePerFuncData
        bool            resulttypeByVal;
 
        bool            plain_agg;              /* is it just a plain aggregate function? */
-       int                     aggno;                  /* if so, index of its PerAggData */
+       int                     aggno;                  /* if so, index of its WindowStatePerAggData */
 
        WindowObject winobj;            /* object used in window function API */
 }                      WindowStatePerFuncData;
@@ -142,7 +142,7 @@ typedef struct WindowStatePerAggData
                                resulttypeByVal,
                                transtypeByVal;
 
-       int                     wfuncno;                /* index of associated PerFuncData */
+       int                     wfuncno;                /* index of associated WindowStatePerFuncData */
 
        /* Context holding transition value and possibly other subsidiary data */
        MemoryContext aggcontext;       /* may be private, or winstate->aggcontext */
index 384887e70d92c23a2afa204b48f0a8d21177339d..d8d863dda2056772149e9c2a613c97c6eb3bccbb 100644 (file)
@@ -44,8 +44,8 @@
  *             StreamClose                     - Close a client/backend connection
  *             TouchSocketFiles        - Protect socket files against /tmp cleaners
  *             pq_init                 - initialize libpq at backend startup
- *             pq_comm_reset   - reset libpq during error recovery
- *             pq_close                - shutdown libpq at backend exit
+ *             socket_comm_reset       - reset libpq during error recovery
+ *             socket_close            - shutdown libpq at backend exit
  *
  * low-level I/O:
  *             pq_getbytes             - get a known number of bytes from connection
index f5d56138ee53db6601b1be669378343a1f639ce7..cf4387e40f0034a1b6d3355be43be4836b4a5838 100644 (file)
@@ -144,7 +144,7 @@ EstimateParamListSpace(ParamListInfo paramLI)
 }
 
 /*
- * Serialize a paramListInfo structure into caller-provided storage.
+ * Serialize a ParamListInfo structure into caller-provided storage.
  *
  * We write the number of parameters first, as a 4-byte integer, and then
  * write details for each parameter in turn.  The details for each parameter
index bf5345999690a7422abd2d1b9ea0a778ff28dfd6..23905a9c352107b1aa19746c410268292a2a2fca 100644 (file)
@@ -1021,7 +1021,7 @@ tbm_iterate(TBMIterator *iterator)
                PagetableEntry *page;
                int                     ntuples;
 
-               /* In ONE_PAGE state, we don't allocate an spages[] array */
+               /* In TBM_ONE_PAGE state, we don't allocate an spages[] array */
                if (tbm->status == TBM_ONE_PAGE)
                        page = &tbm->entry1;
                else
index f8b75e6091800afa9c4105cc2bf402fd37c817fb..0a6bacc2f2a34810e87622732c2f16cfc1be44be 100644 (file)
@@ -91,7 +91,7 @@ geqo_selection(PlannerInfo *root, Chromosome *momma, Chromosome *daddy,
 static int
 linear_rand(PlannerInfo *root, int pool_size, double bias)
 {
-       double          index;                  /* index between 0 and pop_size */
+       double          index;                  /* index between 0 and pool_size */
        double          max = (double) pool_size;
 
        /*
index 8f51f59f8acb35cd8c07db52882f5a6a4853bd5f..0f918dd358dcba37cada82b131c2135896e20df0 100644 (file)
@@ -4242,7 +4242,7 @@ consider_groupingsets_paths(PlannerInfo *root,
                 * 2) If there are no empty sets and only unsortable sets, then the
                 * rollups list will be empty (and thus l_start == NULL), and
                 * group_pathkeys will be NIL; we must ensure that the vacuously-true
-                * pathkeys_contain_in test doesn't cause us to crash.
+                * pathkeys_contained_in test doesn't cause us to crash.
                 */
                if (l_start != NULL &&
                        pathkeys_contained_in(root->group_pathkeys, path->pathkeys))
@@ -5177,7 +5177,7 @@ make_group_input_target(PlannerInfo *root, PathTarget *final_target)
  * a regular aggregation node would, plus any aggregates used in HAVING;
  * except that the Aggref nodes should be marked as partial aggregates.
  *
- * In addition, we'd better emit any Vars and PlaceholderVars that are
+ * In addition, we'd better emit any Vars and PlaceHolderVars that are
  * used outside of Aggrefs in the aggregation tlist and HAVING.  (Presumably,
  * these would be Vars that are grouped by or used in grouping expressions.)
  *
index 0e1015962d727dda4645e68429c05aacf5228995..20abbb3b55a293efbdfa97e470cecedd5df2010d 100644 (file)
@@ -134,7 +134,7 @@ LookupOperName(ParseState *pstate, List *opername, Oid oprleft, Oid oprright,
 /*
  * LookupOperWithArgs
  *             Like LookupOperName, but the argument types are specified by
- *             a ObjectWithArg node.
+ *             a ObjectWithArgs node.
  */
 Oid
 LookupOperWithArgs(ObjectWithArgs *oper, bool noError)
index b4f2b28b517fbe58410d215398b938ae7fc7bb55..2bb14cdd026c9d78780ce4f34581f545aa339dd4 100644 (file)
@@ -6122,7 +6122,7 @@ pgstat_recv_resetcounter(PgStat_MsgResetcounter *msg, int len)
 }
 
 /* ----------
- * pgstat_recv_resetshared() -
+ * pgstat_recv_resetsharedcounter() -
  *
  *     Reset some shared statistics of the cluster.
  * ----------
index 8765af71d4daf9432aea1698a38eec955b8c39af..91078dcd806475670aa69de3014fb3c02a142437 100644 (file)
@@ -288,7 +288,6 @@ struct vars
 #define NWBDRY 'W'                             /* non-word-boundary constraint */
 #define SBEGIN 'A'                             /* beginning of string (even if not BOL) */
 #define SEND   'Z'                             /* end of string (even if not EOL) */
-#define PREFER 'P'                             /* length preference */
 
 /* is an arc colored, and hence on a color chain? */
 #define COLORED(a) \
index e8ffa0492f1dc8d8d4dcf57600813d3ec308d2c7..5fa3d7323e99c41c782991a6658e57520b5311f6 100644 (file)
@@ -1381,7 +1381,7 @@ ReorderBufferCopySnap(ReorderBuffer *rb, Snapshot orig_snap,
        snap->subxip[i++] = txn->xid;
 
        /*
-        * nsubxcnt isn't decreased when subtransactions abort, so count manually.
+        * subxcnt isn't decreased when subtransactions abort, so count manually.
         * Since it's an upper boundary it is safe to use it for the allocation
         * above.
         */
index fadab62950d65a4f5c6561996c71c2b40851c620..469aac38c403b32d1436a84c35e702da78d52cc1 100644 (file)
@@ -265,7 +265,6 @@ CreateSharedProcArray(void)
                                                        &found);
        }
 
-       /* Register and initialize fields of ProcLWLockTranche */
        LWLockRegisterTranche(LWTRANCHE_PROC, "proc");
 }
 
index 4c245d1f85ef19b3e92ce01aeeec3df85139f0e7..551515960d1b5f04a61eed99cc92d404e081d822 100644 (file)
@@ -1251,7 +1251,7 @@ shm_mq_inc_bytes_written(shm_mq *mq, Size n)
                                                pg_atomic_read_u64(&mq->mq_bytes_written) + n);
 }
 
-/* Shim for on_dsm_callback. */
+/* Shim for on_dsm_detach callback. */
 static void
 shm_mq_detach_callback(dsm_segment *seg, Datum arg)
 {
index 1b7053cb1cf5b1471cfa1c5222a1c70eef36352d..9089733ecc7ba92848f5246f5c8751b86fcc12ff 100644 (file)
@@ -996,8 +996,8 @@ LockAcquireExtended(const LOCKTAG *locktag,
 
                /*
                 * We can't acquire the lock immediately.  If caller specified no
-                * blocking, remove useless table entries and return NOT_AVAIL without
-                * waiting.
+                * blocking, remove useless table entries and return
+                * LOCKACQUIRE_NOT_AVAIL without waiting.
                 */
                if (dontWait)
                {
index 2d709420c3df5662b17de394c504e88501e25f95..85a629f4fcef7fac01746c83f4004fcb1be03533 100644 (file)
@@ -364,7 +364,7 @@ static SERIALIZABLEXACT *OldCommittedSxact;
  * These configuration variables are used to set the predicate lock table size
  * and to control promotion of predicate locks to coarser granularity in an
  * attempt to degrade performance (mostly as false positive serialization
- * failure) gracefully in the face of memory pressurel
+ * failure) gracefully in the face of memory pressure.
  */
 int                    max_predicate_locks_per_xact;   /* set by guc.c */
 int                    max_predicate_locks_per_relation;       /* set by guc.c */
@@ -4809,7 +4809,7 @@ OnConflict_CheckForSerializationFailure(const SERIALIZABLEXACT *reader,
 }
 
 /*
- * PreCommit_CheckForSerializableConflicts
+ * PreCommit_CheckForSerializationFailure
  *             Check for dangerous structures in a serializable transaction
  *             at commit.
  *
index f526106530500d96ff0dd476c72c8d3608203d13..5d4f26a490112c48517748f10682558b33825f96 100644 (file)
@@ -325,7 +325,7 @@ pg_read_binary_file(PG_FUNCTION_ARGS)
 
 /*
  * Wrapper functions for the 1 and 3 argument variants of pg_read_file_v2()
- * and pg_binary_read_file().
+ * and pg_read_binary_file().
  *
  * These are necessary to pass the sanity check in opr_sanity, which checks
  * that all built-in functions that share the implementing C function take
index 0c58f1f1096c04d4353897598df8fa28a3aff097..54816dc0287f3b30b49fb1ec527223ad223d9e8b 100644 (file)
@@ -115,7 +115,7 @@ typedef struct
        List       *windowTList;        /* targetlist for resolving WINDOW clause */
        int                     prettyFlags;    /* enabling of pretty-print functions */
        int                     wrapColumn;             /* max line length, or -1 for no limit */
-       int                     indentLevel;    /* current indent level for prettyprint */
+       int                     indentLevel;    /* current indent level for pretty-print */
        bool            varprefix;              /* true to print prefixes on Vars */
        ParseExprKind special_exprkind; /* set only for exprkinds needing special
                                                                         * handling */
index e23669fb4fbb46d96be8e45f9d2d7b350d5a0590..bd8d20098296dfa55986e5b4bedf2057050045f4 100644 (file)
@@ -40,7 +40,7 @@
  *
  *     For each block, we maintain pointer to the first free chunk - this is quite
  *     cheap and allows us to skip all the preceding used chunks, eliminating
- *     a significant number of lookups in many common usage patters. In the worst
+ *     a significant number of lookups in many common usage patterns. In the worst
  *     case this performs as if the pointer was not maintained.
  *
  *     We cache the freelist index for the blocks with the fewest free chunks
index 40fe6ed3d307a7fae651b7e13cbbdcfedfecf464..47b0517596ef77289096b21355779907ba191cba 100644 (file)
@@ -1171,7 +1171,7 @@ AtEOXact_Snapshot(bool isCommit, bool resetXmin)
 
        /*
         * During normal commit processing, we call ProcArrayEndTransaction() to
-        * reset the PgXact->xmin. That call happens prior to the call to
+        * reset the MyPgXact->xmin. That call happens prior to the call to
         * AtEOXact_Snapshot(), so we need not touch xmin here at all.
         */
        if (resetXmin)
index 09eabfbe5ab02842334512f7474a01658e0c053f..9c303e9cc47ebf4a257f9df3267493e37c4981ab 100644 (file)
@@ -1295,7 +1295,7 @@ setup_config(void)
                err = WSAStartup(MAKEWORD(2, 2), &wsaData);
 #endif
 
-               /* for best results, this code should match parse_hba() */
+               /* for best results, this code should match parse_hba_line() */
                hints.ai_flags = AI_NUMERICHOST;
                hints.ai_family = AF_UNSPEC;
                hints.ai_socktype = 0;
index ccf2153fac4e3ed31ea02db60654fecd0d097517..dfba58ac5877b11054da4a5527c3b1786458f851 100644 (file)
 
 
 #define oidcmp(x,y) ( ((x) < (y) ? -1 : ((x) > (y)) ?  1 : 0) )
-#define oideq(x,y) ( (x) == (y) )
-#define oidle(x,y) ( (x) <= (y) )
-#define oidge(x,y) ( (x) >= (y) )
-#define oidzero(x) ( (x) == 0 )
 
 /*
  * The data structures used to store system catalog information.  Every
index f9b1ae6809d5cdc7db8259352d570fab1fcf8f25..40a6b3745cb4c66831fe2fb1e0cc1a320cf57d1b 100644 (file)
@@ -54,8 +54,6 @@
 
 static void usage(const char *progname);
 
-typedef struct option optType;
-
 int
 main(int argc, char **argv)
 {
index 9d9c33d78c3ce5c0e632eb85ea5b0c51755eed17..74063ebf2f97205475d87b6a13111097bab26a53 100644 (file)
@@ -934,8 +934,8 @@ RewriteControlFile(void)
  *
  * On entry, ControlFile.checkPointCopy.redo and ControlFile.xlog_seg_size
  * are assumed valid (note that we allow the old xlog seg size to differ
- * from what we're using).  On exit, newXlogId and newXlogSeg are set to
- * suitable values for the beginning of replacement WAL (in our seg size).
+ * from what we're using).  On exit, newXlogSegNo is set to suitable
+ * value for the beginning of replacement WAL (in our seg size).
  */
 static void
 FindEndOfXLOG(void)
index 17736c37827f0b9356c24f333793b2c1d7e85ef6..b50c7d209ca475d71045938e16840a2ceb58a4f1 100644 (file)
@@ -31,7 +31,7 @@ extern bool describeOperators(const char *pattern, bool verbose, bool showSystem
 extern bool describeRoles(const char *pattern, bool verbose, bool showSystem);
 
 /* \drds */
-extern bool listDbRoleSettings(const char *pattern1, const char *pattern2);
+extern bool listDbRoleSettings(const char *pattern, const char *pattern2);
 
 /* \z (or \dp) */
 extern bool permissionsList(const char *pattern);
index 421dd4e68ea68921d04ceb1d3c70d5e42caf7cb1..fee58a184aa97790103cfc05ead1e8efc912fa6c 100644 (file)
@@ -66,7 +66,7 @@ main(int argc, char **argv)
 
                if (pg_wcscmp(test->output, result) != 0)
                {
-                       printf("FAILURE (Normalizationdata.txt line %d):\n", test->linenum);
+                       printf("FAILURE (NormalizationTest.txt line %d):\n", test->linenum);
                        printf("input:\t%s\n", print_wchar_str(test->input));
                        printf("expected:\t%s\n", print_wchar_str(test->output));
                        printf("got\t%s\n", print_wchar_str(result));
index e22bfbf3e62bdff7a28744aabaab5d963005aa6c..1433aa3ff7acb10c48129f6ee1dc8d4d6d391772 100644 (file)
@@ -35,7 +35,7 @@ extern Size CommitTsShmemSize(void);
 extern void CommitTsShmemInit(void);
 extern void BootStrapCommitTs(void);
 extern void StartupCommitTs(void);
-extern void CommitTsParameterChange(bool xlrecvalue, bool pgcontrolvalue);
+extern void CommitTsParameterChange(bool newvalue, bool oldvalue);
 extern void CompleteCommitTsInitialization(void);
 extern void ShutdownCommitTs(void);
 extern void CheckPointCommitTs(void);
index afb3e1572169c305f5fe463e750f7fe5c3ec3b94..78fcd826f185eab758785ce184ee26b137657394 100644 (file)
@@ -54,7 +54,7 @@ typedef struct GinState
        bool            oneCol;                 /* true if single-column index */
 
        /*
-        * origTupDesc is the nominal tuple descriptor of the index, ie, the i'th
+        * origTupdesc is the nominal tuple descriptor of the index, ie, the i'th
         * attribute shows the key type (not the input data type!) of the i'th
         * index column.  In a single-column index this describes the actual leaf
         * index tuples.  In a multi-column index, the actual leaf tuples contain
@@ -443,7 +443,7 @@ extern void ginInsertCleanup(GinState *ginstate, bool full_clean,
 
 /* ginpostinglist.c */
 
-extern GinPostingList *ginCompressPostingList(const ItemPointer ptrs, int nptrs,
+extern GinPostingList *ginCompressPostingList(const ItemPointer ipd, int nipd,
                                                                                          int maxsize, int *nwritten);
 extern int     ginPostingListDecodeAllSegmentsToTbm(GinPostingList *ptr, int totalsize, TIDBitmap *tbm);
 
index 107c3d01ae4770621cd950152c43a28b95f66bb7..0d49f4253c54835c9b36c53152809351be12962c 100644 (file)
@@ -252,7 +252,7 @@ typedef struct HashMetaPageData
        uint32          hashm_maxbucket;        /* ID of maximum bucket in use */
        uint32          hashm_highmask; /* mask to modulo into entire table */
        uint32          hashm_lowmask;  /* mask to modulo into lower half of table */
-       uint32          hashm_ovflpoint;        /* splitpoint from which ovflpgs being
+       uint32          hashm_ovflpoint;        /* splitpoint from which ovflpage being
                                                                         * allocated */
        uint32          hashm_firstfree;        /* lowest-number free ovflpage (bit#) */
        uint32          hashm_nmaps;    /* number of bitmap pages */
index 9beccc86eaf12634f19797e09dd9b4ee202f7239..afa614da2524919299ba570393c44b84a2c8dc48 100644 (file)
@@ -259,4 +259,4 @@ extern void btree_desc(StringInfo buf, XLogReaderState *record);
 extern const char *btree_identify(uint8 info);
 extern void btree_mask(char *pagedata, BlockNumber blkno);
 
-#endif                                                 /* NBXLOG_H */
+#endif                                                 /* NBTXLOG_H */
index df24089ea453991fce16479dc54789f9cf11ba86..eeb0412b6627dd86490e8179e004d4e2729dbfc0 100644 (file)
@@ -42,7 +42,7 @@
 extern void XLogBeginInsert(void);
 extern void XLogSetRecordFlags(uint8 flags);
 extern XLogRecPtr XLogInsert(RmgrId rmid, uint8 info);
-extern void XLogEnsureRecordSpace(int nbuffers, int ndatas);
+extern void XLogEnsureRecordSpace(int max_block_id, int ndatas);
 extern void XLogRegisterData(char *data, int len);
 extern void XLogRegisterBuffer(uint8 block_id, Buffer buffer, uint8 flags);
 extern void XLogRegisterBlock(uint8 block_id, RelFileNode *rnode,
index 507b082acb4b954f08b24d77af264bcaa11112ec..80def7d4014be014390e758eff8c5d8ff020939f 100644 (file)
@@ -25,8 +25,8 @@
  *
  * The rule for developers is: if you commit a change that requires
  * an initdb, you should update the catalog version number (as well as
- * notifying the pghackers mailing list, which has been the informal
- * practice for a long time).
+ * notifying the pgsql-hackers mailing list, which has been the
+ * informal practice for a long time).
  *
  * The catalog version number is placed here since modifying files in
  * include/catalog is the most common kind of initdb-forcing change.
index c724430aecad586705c53ffd6d9db7312b806a88..02fc17d7c093f9fdc18051e8b443504813774052 100644 (file)
@@ -43,7 +43,7 @@ extern ObjectAddress InsertExtensionTuple(const char *extName, Oid extOwner,
 extern ObjectAddress ExecAlterExtensionStmt(ParseState *pstate, AlterExtensionStmt *stmt);
 
 extern ObjectAddress ExecAlterExtensionContentsStmt(AlterExtensionContentsStmt *stmt,
-                                                                                                       ObjectAddress *objAddress);
+                                                                                                       ObjectAddress *objAddr);
 
 extern Oid     get_extension_oid(const char *extname, bool missing_ok);
 extern char *get_extension_name(Oid ext_oid);
index ac2bfaff1e4bdc10d1030fdde06d95e2f9485437..9c25a805f2923655dd20d7731ec052a4b2686155 100644 (file)
@@ -87,7 +87,7 @@ extern void RangeVarCallbackOwnsTable(const RangeVar *relation,
                                                                          Oid relId, Oid oldRelId, void *arg);
 
 extern void RangeVarCallbackOwnsRelation(const RangeVar *relation,
-                                                                                Oid relId, Oid oldRelId, void *noCatalogs);
+                                                                                Oid relId, Oid oldRelId, void *arg);
 extern bool PartConstraintImpliedByRelConstraint(Relation scanrel,
                                                                                                 List *partConstraint);
 
index 8e7f7c3d137264fb83125795a2f269bb333989f9..d21dbead0a2c60e807638f99721c9a43f36bf3d8 100644 (file)
@@ -576,7 +576,7 @@ typedef struct ExprEvalStep
                /* for EEOP_WINDOW_FUNC */
                struct
                {
-                       /* out-of-line state, modified by nodeWindowFunc.c */
+                       /* out-of-line state, modified by nodeWindowAgg.c */
                        WindowFuncExprState *wfstate;
                }                       window_func;
 
index 0339b98041d06c58c10c6c42eefa176253a79d32..3e3e6c470e9f5208f99454c134059aa793de59ab 100644 (file)
@@ -289,7 +289,7 @@ typedef enum pg_enc
 #define PG_ENCODING_BE_LAST PG_KOI8U
 
 /*
- * Please use these tests before access to pg_encconv_tbl[]
+ * Please use these tests before access to pg_enc2name_tbl[]
  * or to other places...
  */
 #define PG_VALID_BE_ENCODING(_enc) \
index d1ec2d97f21cc32094fb4774bbd6e0591f6f7e08..5a3b287eaf0594f5b7bdc465197f7b9b1cf4f028 100644 (file)
@@ -11,8 +11,8 @@
  *
  *-------------------------------------------------------------------------
  */
-#ifndef PARSER_FUNC_H
-#define PARSER_FUNC_H
+#ifndef PARSE_FUNC_H
+#define PARSE_FUNC_H
 
 #include "catalog/namespace.h"
 #include "parser/parse_node.h"
index f93009eff57c5fc191de4296a5cead25a36dc7df..fab66f8e9871e0feb303b0bf610d3ed57ca511e7 100644 (file)
@@ -178,7 +178,7 @@ pg_atomic_init_flag(volatile pg_atomic_flag *ptr)
 }
 
 /*
- * pg_atomic_test_and_set_flag - TAS()
+ * pg_atomic_test_set_flag - TAS()
  *
  * Returns true if the flag has successfully been set, false otherwise.
  *
index 7eb274adac905361e600ff5a1707fd6b97d8b9c8..d73eed585e6e1d30256a04e4328b7ca88847f22b 100644 (file)
@@ -22,8 +22,8 @@
  *
  * This is a pointer to an item within a disk page of a known file
  * (for example, a cross-link from an index to its parent table).
- * blkid tells us which block, posid tells us which entry in the linp
- * (ItemIdData) array we want.
+ * ip_blkid tells us which block, ip_posid tells us which entry in
+ * the linp (ItemIdData) array we want.
  *
  * Note: because there is an item pointer in each tuple header and index
  * tuple header on disk, it's very important not to waste space with
index 82655d1466a152a399192dded8ca140d315a1997..02e663f6ed73bfa72e0ce826e5049e4a9f5dec3b 100644 (file)
@@ -26,7 +26,6 @@ typedef uint16 OffsetNumber;
 #define InvalidOffsetNumber            ((OffsetNumber) 0)
 #define FirstOffsetNumber              ((OffsetNumber) 1)
 #define MaxOffsetNumber                        ((OffsetNumber) (BLCKSZ / sizeof(ItemIdData)))
-#define OffsetNumberMask               (0xffff)        /* valid uint16 bits */
 
 /* ----------------
  *             support macros
index ac7ee72952e18ca04e5b36380adc5e0d1f355136..281e1db72592344a95beef7ee0e35acea1b16b7a 100644 (file)
@@ -332,4 +332,4 @@ extern PGPROC *AuxiliaryPidGetProc(int pid);
 extern void BecomeLockGroupLeader(void);
 extern bool BecomeLockGroupMember(PGPROC *leader, int pid);
 
-#endif                                                 /* PROC_H */
+#endif                                                 /* _PROC_H_ */
index 5f4d479a7b258c16754da328fdeee92e8ffb5426..1c56acca55a72e9dd7b7bee6dfaf469b1ff3ed44 100644 (file)
@@ -94,7 +94,7 @@ typedef struct JsonSemAction
 } JsonSemAction;
 
 /*
- * parse_json will parse the string in the lex calling the
+ * pg_parse_json will parse the string in the lex calling the
  * action functions in sem at the appropriate points. It is
  * up to them to keep what state they need     in semstate. If they
  * need access to the state of the lexer, then its pointer
index 4e2016c7aea6d05fff346d529ff5a2a67022e73c..de5c43a4602691fb6aa4a31d432def044046bb35 100644 (file)
@@ -2062,8 +2062,9 @@ ecpg_do_prologue(int lineno, const int compat, const int force_indicator,
        /*------
         * create a list of variables
         *
-        * The variables are listed with input variables preceding outputvariables
-        * The end of each group is marked by an end marker. per variable we list:
+        * The variables are listed with input variables preceding output
+        * variables.  The end of each group is marked by an end marker.
+        * Per variable we list:
         *
         * type - as defined in ecpgtype.h
         * value - where to store the data
index 53fcd2157fadf5c3180639947e49c369f1c1894e..9ee460b9a1f9024177b7ec860881e5b498abdea8 100644 (file)
@@ -623,7 +623,7 @@ PGTYPESdate_defmt_asc(date * d, const char *fmt, const char *str)
 
                        /*
                         * evil[tm] hack: if we read the pgtypes_date_months and haven't
-                        * found a match, reset list to point to pgtypes_date_months_short
+                        * found a match, reset list to point to months (abbreviations)
                         * and reset the counter variable i
                         */
                        if (list == pgtypes_date_months)
index a329ebbf93a2f95de8f5ab37201fb1c180243648..d262b57021d9ee39ee1af63500ae96483c71165e 100644 (file)
@@ -3732,8 +3732,8 @@ internal_ping(PGconn *conn)
         * PQPING_NO_RESPONSE.  This result could be somewhat misleading for a
         * pre-7.4 server, since it won't send back a SQLSTATE, but those are long
         * out of support.  Another corner case where the server could return a
-        * failure without a SQLSTATE is fork failure, but NO_RESPONSE isn't
-        * totally unreasonable for that anyway.  We expect that every other
+        * failure without a SQLSTATE is fork failure, but PQPING_NO_RESPONSE
+        * isn't totally unreasonable for that anyway.  We expect that every other
         * failure case in a modern server will produce a report with a SQLSTATE.
         *
         * NOTE: whenever we get around to making libpq generate SQLSTATEs for
index 48d4ebdd96cd766e77a0fefc934819a8efba0451..b3c59a099233333b8dc62c8c4d13f6e5ca3b3c89 100644 (file)
@@ -3291,7 +3291,7 @@ PQflush(PGconn *conn)
  *             PQfreemem - safely frees memory allocated
  *
  * Needed mostly by Win32, unless multithreaded DLL (/MD in VC6)
- * Used for freeing memory from PQescapeByte()a/PQunescapeBytea()
+ * Used for freeing memory from PQescapeBytea()/PQunescapeBytea()
  */
 void
 PQfreemem(void *ptr)
index 2d44845ccb2c3924cfce070f06298b9497d9c016..18fec4a17314c47a6acc99b59c20748387373512 100644 (file)
@@ -7,7 +7,7 @@
  *              miscellaneous useful functions
  *
  * The communication routines here are analogous to the ones in
- * backend/libpq/pqcomm.c and backend/libpq/pqcomprim.c, but operate
+ * backend/libpq/pqcomm.c and backend/libpq/pqformat.c, but operate
  * in the considerably different environment of the frontend libpq.
  * In particular, we work with a bare nonblock-mode socket, rather than
  * a stdio stream, so that we can avoid unwanted blocking of the application.
index 26198fc1de4a3a265a111fa531ba2ba100298012..3151975564af72548518ee2018e02b05109cd977 100644 (file)
@@ -565,10 +565,10 @@ extern void PQdisplayTuples(const PGresult *res,
 
 extern void PQprintTuples(const PGresult *res,
                                                  FILE *fout,   /* output stream */
-                                                 int printAttName, /* print attribute names */
-                                                 int terseOutput,      /* delimiter bars */
-                                                 int width);   /* width of column, if 0, use variable
-                                                                                * width */
+                                                 int PrintAttNames,    /* print attribute names */
+                                                 int TerseOutput,      /* delimiter bars */
+                                                 int colWidth);        /* width of column, if 0, use
+                                                                                        * variable width */
 
 
 /* === in fe-lobj.c === */
index fcf2bc2cab3f997f51bdf8c3d7cc5fad42b50e90..d37bb3ce40482e03784b389da544dac05f29d6a5 100644 (file)
@@ -169,7 +169,7 @@ struct pg_result
        int                     ntups;
        int                     numAttributes;
        PGresAttDesc *attDescs;
-       PGresAttValue **tuples;         /* each PGresTuple is an array of
+       PGresAttValue **tuples;         /* each PGresult tuple is an array of
                                                                 * PGresAttValue's */
        int                     tupArrSize;             /* allocated size of tuples array */
        int                     numParameters;
@@ -232,7 +232,8 @@ typedef enum
        PGQUERY_DESCRIBE                        /* Describe Statement or Portal */
 } PGQueryClass;
 
-/* PGSetenvStatusType defines the state of the PQSetenv state machine */
+/* PGSetenvStatusType defines the state of the pqSetenv state machine */
+
 /* (this is used only for 2.0-protocol connections) */
 typedef enum
 {
index 30c7e967dfa593efac8f91d8626797c797efad90..30246c53294a66a63871def1cde9217f39c91f54 100644 (file)
@@ -2452,7 +2452,7 @@ delete_function(PLpgSQL_function *func)
                plpgsql_free_function_memory(func);
 }
 
-/* exported so we can call it from plpgsql_init() */
+/* exported so we can call it from _PG_init() */
 void
 plpgsql_HashTableInit(void)
 {
index a5a5ef9de709fd6fd78cf4c5da0556fc4b4749f8..8b32075df01e1c052228af0d12810f22b08c5060 100644 (file)
@@ -685,7 +685,7 @@ typedef struct PLpgSQL_stmt_fori
 /*
  * PLpgSQL_stmt_forq represents a FOR statement running over a SQL query.
  * It is the common supertype of PLpgSQL_stmt_fors, PLpgSQL_stmt_forc
- * and PLpgSQL_dynfors.
+ * and PLpgSQL_stmt_dynfors.
  */
 typedef struct PLpgSQL_stmt_forq
 {
index 50b07cad8207e1e13c841d2875fc93e869873239..6e08c03fcdb36f8a24e8e4d512fcb96899b8ad51 100644 (file)
@@ -471,7 +471,7 @@ PLy_procedure_munge_source(const char *name, const char *src)
        *mp = '\0';
 
        if (mp > (mrc + mlen))
-               elog(FATAL, "buffer overrun in PLy_munge_source");
+               elog(FATAL, "buffer overrun in PLy_procedure_munge_source");
 
        return mrc;
 }
index c3c8280ea23d4403246ede5be33a6c9e5defd006..dc22e5ca9d4e937b95b845d9bd18f2f14b54eaa6 100644 (file)
@@ -55,7 +55,7 @@ installcheck: all
 check: all
        $(pg_isolation_regress_check) --schedule=$(srcdir)/isolation_schedule
 
-# Versions of the check tests that include the prepared_transactions test
+# Versions of the check tests that include the prepared-transactions test
 # It only makes sense to run these if set up to use prepared transactions,
 # via TEMP_CONFIG for the check case, or via the postgresql.conf for the
 # installcheck case.
index 0d3554659b01687199b337f2585025d4c02e0a39..b5d1dc6e89aaab610c407690e4c6e0f8e62f062c 100644 (file)
@@ -230,8 +230,7 @@ sub AddDir
                                if ($filter eq "LIBOBJS")
                                {
                                        no warnings qw(once);
-                                       if (grep(/$p/, @main::pgportfiles, @main::pgcommonfiles)
-                                               == 1)
+                                       if (grep(/$p/, @main::pgportfiles) == 1)
                                        {
                                                $p =~ s/\.c/\.o/;
                                                $matches .= $p . " ";