Hello hackers, I've stumbled upon a misspelled HAVE_ZLIB in a comment and decided to check all the unique identifiers/entities in the source tree. Using the balleyeing technique I've processed questionable A* and HAVE_* unicums (for now). The patches for every one are attached.
1. AExprConst -> AexprConst (an inconsistent case) 2. AlterExtensionOwner_oid - remove (orphaned after 994c36e0) 3. AlterTableDropColumn -> ATExecDropColumn (renamed in 077db40f) 4. ApplySortComparatorFull -> ApplySortAbbrevFullComparator (an internal inconsistency) 5. arracontjoinsel -> arraycontjoinsel (just a typo) 6. ArrayNItems -> ArrayGetNItems (an internal inconsistency) 7. ArrayRef & ArrayRefState -> SubscriptingRef & SubscriptingRefState (renamed by 558d77f2) 8. AT_AddOids - remove (orphaned after 578b2297) 10. AtPrepare_Inval - remove (orphaned after efc16ea52) 11. AttachIndexInfo -> IndexAttachInfo (an internal inconsistency) 12. AttributeOffsetGetAttributeNumber - > AttrOffsetGetAttrNumber (an internal inconsistency) 13. AttInMetaData -> AttInMetadata (an inconsistent case) 14. AUTH_REQ_GSSAPI -> AUTH_REQ_GSS (an internal inconsistency) 15. authenticaion -> authentication (a typo) 16. HAVE__BUILTIN_CLZ -> HAVE__BUILTIN_CLZ (a typo) 17. HAVE_BUILTIN_CLZ -> HAVE__BUILTIN_CLZ (a typo) 18. HAVE_BUILTIN_CTZ -> HAVE__BUILTIN_CLZ (a typo) 18. HAVE_FCVT - remove (survived after ff4628f3) 19. HAVE_FINITE - remove (orphaned after cac2d912) 20. HAVE_RAND_OPENSSL - remove (orphaned after fe0a0b59) 21. HAVE_STRUCT_SOCKADDR_UN - remove (survived after ff4628f3) 22. HAVE_SYSCONF - remove (survived after ff4628f3) 23. HAVE_ZLIB -> HAVE_LIBZ (a typo) I hope you will find it useful. If so, I can continue this work. Best regards, Alexander
diff --git a/src/backend/parser/gram.y b/src/backend/parser/gram.y index 3dc0e8a4fb..afd3e80e99 100644 --- a/src/backend/parser/gram.y +++ b/src/backend/parser/gram.y @@ -12541,7 +12541,7 @@ SimpleTypename: * Note that ConstInterval is not included here since it must * be pushed up higher in the rules to accommodate the postfix * options (e.g. INTERVAL '1' YEAR). Likewise, we have to handle - * the generic-type-name case in AExprConst to avoid premature + * the generic-type-name case in AexprConst to avoid premature * reduce/reduce conflicts against function names. */ ConstTypename:
diff --git a/src/include/commands/extension.h b/src/include/commands/extension.h index 2cdc26c776..06a0540e8e 100644 --- a/src/include/commands/extension.h +++ b/src/include/commands/extension.h @@ -51,6 +51,4 @@ extern char *get_extension_name(Oid ext_oid); extern ObjectAddress AlterExtensionNamespace(const char *extensionName, const char *newschema, Oid *oldschema); -extern void AlterExtensionOwner_oid(Oid extensionOid, Oid newOwnerId); - #endif /* EXTENSION_H */
diff --git a/src/backend/catalog/heap.c b/src/backend/catalog/heap.c index 6cffe550b3..c99aef04a2 100644 --- a/src/backend/catalog/heap.c +++ b/src/backend/catalog/heap.c @@ -1588,7 +1588,7 @@ RemoveAttributeById(Oid relid, AttrNumber attnum) /* * Grab an exclusive lock on the target table, which we will NOT release * until end of transaction. (In the simple case where we are directly - * dropping this column, AlterTableDropColumn already did this ... but + * dropping this column, ATExecDropColumn already did this ... but * when cascading from a drop of some other object, we may not have any * lock.) */
diff --git a/src/include/utils/sortsupport.h b/src/include/utils/sortsupport.h index 45b292e9c7..0884352d43 100644 --- a/src/include/utils/sortsupport.h +++ b/src/include/utils/sortsupport.h @@ -184,9 +184,9 @@ typedef struct SortSupportData /* * Full, authoritative comparator for key that an abbreviated * representation was generated for, used when an abbreviated comparison - * was inconclusive (by calling ApplySortComparatorFull()), or used to + * was inconclusive (by calling ApplySortAbbrevFullComparator()), or used * replace "comparator" when core system ultimately decides against - * abbreviation. + * to abbreviation. */ int (*abbrev_full_comparator) (Datum x, Datum y, SortSupport ssup); } SortSupportData;
diff --git a/contrib/intarray/_int_selfuncs.c b/contrib/intarray/_int_selfuncs.c index 6ebe0ab9a8..3455cfe660 100644 --- a/contrib/intarray/_int_selfuncs.c +++ b/contrib/intarray/_int_selfuncs.c @@ -43,7 +43,7 @@ static int compare_val_int4(const void *a, const void *b); * * The default array selectivity operators for the @>, && and @< operators * work fine for integer arrays. However, if we tried to just use arraycontsel - * and arracontjoinsel directly as the cost estimator functions for our + * and arraycontjoinsel directly as the cost estimator functions for our * operators, they would not work as intended, because they look at the * operator's OID. Our operators behave exactly like the built-in anyarray * versions, but we must tell the cost estimator functions which built-in
diff --git a/src/backend/utils/adt/arrayfuncs.c b/src/backend/utils/adt/arrayfuncs.c index 9cef018c0b..48f3b1c366 100644 --- a/src/backend/utils/adt/arrayfuncs.c +++ b/src/backend/utils/adt/arrayfuncs.c @@ -1322,7 +1322,7 @@ array_recv(PG_FUNCTION_ARGS) lBound[i] = pq_getmsgint(buf, 4); /* - * Check overflow of upper bound. (ArrayNItems() below checks that + * Check overflow of upper bound. (ArrayGetNItems() below checks that * dim[i] >= 0) */ if (dim[i] != 0)
diff --git a/contrib/postgres_fdw/expected/postgres_fdw.out b/contrib/postgres_fdw/expected/postgres_fdw.out index e034b030f1..b9ef6aea64 100644 --- a/contrib/postgres_fdw/expected/postgres_fdw.out +++ b/contrib/postgres_fdw/expected/postgres_fdw.out @@ -665,7 +665,7 @@ EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE c1 = ANY(ARRAY[c2, 1, c1 Remote SQL: SELECT "C 1", c2, c3, c4, c5, c6, c7, c8 FROM "S 1"."T 1" WHERE (("C 1" = ANY (ARRAY[c2, 1, ("C 1" + 0)]))) (3 rows) -EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE c1 = (ARRAY[c1,c2,3])[1]; -- ArrayRef +EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE c1 = (ARRAY[c1,c2,3])[1]; -- SubscriptingRef QUERY PLAN ---------------------------------------------------------------------------------------------------------------------- Foreign Scan on public.ft1 t1 diff --git a/contrib/postgres_fdw/sql/postgres_fdw.sql b/contrib/postgres_fdw/sql/postgres_fdw.sql index 73852f1ae6..82e11eaf52 100644 --- a/contrib/postgres_fdw/sql/postgres_fdw.sql +++ b/contrib/postgres_fdw/sql/postgres_fdw.sql @@ -297,7 +297,7 @@ EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE c1 = -c1; -- Op EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE 1 = c1!; -- OpExpr(r) EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE (c1 IS NOT NULL) IS DISTINCT FROM (c1 IS NOT NULL); -- DistinctExpr EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE c1 = ANY(ARRAY[c2, 1, c1 + 0]); -- ScalarArrayOpExpr -EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE c1 = (ARRAY[c1,c2,3])[1]; -- ArrayRef +EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE c1 = (ARRAY[c1,c2,3])[1]; -- SubscriptingRef EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE c6 = E'foo''s\\bar'; -- check special chars EXPLAIN (VERBOSE, COSTS OFF) SELECT * FROM ft1 t1 WHERE c8 = 'foo'; -- can't be sent to remote -- parameterized remote path for foreign table diff --git a/src/backend/executor/execExpr.c b/src/backend/executor/execExpr.c index 0a7b2b8f47..369b9fc8c7 100644 --- a/src/backend/executor/execExpr.c +++ b/src/backend/executor/execExpr.c @@ -1200,7 +1200,7 @@ ExecInitExprRec(Expr *node, ExprState *state, * field's values[]/nulls[] entries as both the caseval * source and the result address for this subexpression. * That's okay only because (1) both FieldStore and - * ArrayRef evaluate their arg or refexpr inputs first, + * SubscriptingRef evaluate their arg or refexpr inputs first, * and (2) any such CaseTestExpr is directly the arg or * refexpr input. So any read of the caseval will occur * before there's a chance to overwrite it. Also, if diff --git a/src/backend/optimizer/util/clauses.c b/src/backend/optimizer/util/clauses.c index 501b0e9e2d..8808da7679 100644 --- a/src/backend/optimizer/util/clauses.c +++ b/src/backend/optimizer/util/clauses.c @@ -3409,8 +3409,8 @@ eval_const_expressions_mutator(Node *node, { /* * This case could be folded into the generic handling used - * for ArrayRef etc. But because the simplification logic is - * so trivial, applying evaluate_expr() to perform it would be + * for SubscriptingRef etc. But because the simplification logic + * is so trivial, applying evaluate_expr() to perform it would be * a heavy overhead. BooleanTest is probably common enough to * justify keeping this bespoke implementation. */ diff --git a/src/backend/parser/parse_target.c b/src/backend/parser/parse_target.c index 0e9598ebfe..9bd7e14cd3 100644 --- a/src/backend/parser/parse_target.c +++ b/src/backend/parser/parse_target.c @@ -695,7 +695,7 @@ transformAssignmentIndirection(ParseState *pstate, /* * Set up a substitution. We abuse CaseTestExpr for this. It's safe * to do so because the only nodes that will be above the CaseTestExpr - * in the finished expression will be FieldStore and ArrayRef nodes. + * in the finished expression will be FieldStore and SubscriptingRef nodes. * (There could be other stuff in the tree, but it will be within * other child fields of those node types.) */ diff --git a/src/backend/rewrite/rewriteHandler.c b/src/backend/rewrite/rewriteHandler.c index 39080776b0..ddcbaf3811 100644 --- a/src/backend/rewrite/rewriteHandler.c +++ b/src/backend/rewrite/rewriteHandler.c @@ -980,9 +980,9 @@ process_matched_tle(TargetEntry *src_tle, * * As a further complication, the destination column might be a domain, * resulting in each assignment containing a CoerceToDomain node over a - * FieldStore or ArrayRef. These should have matching target domains, + * FieldStore or SubscriptingRef. These should have matching target domains, * so we strip them and reconstitute a single CoerceToDomain over the - * combined FieldStore/ArrayRef nodes. (Notice that this has the result + * combined FieldStore/SubscriptingRef nodes. (Notice that this has the result * that the domain's checks are applied only after we do all the field or * element updates, not after each one. This is arguably desirable.) *---------- diff --git a/src/include/nodes/primnodes.h b/src/include/nodes/primnodes.h index f9b1cf2df7..2805e803d6 100644 --- a/src/include/nodes/primnodes.h +++ b/src/include/nodes/primnodes.h @@ -942,7 +942,7 @@ typedef struct CaseWhen * We also abuse this node type for some other purposes, including: * * Placeholder for the current array element value in ArrayCoerceExpr; * see build_coercion_expression(). - * * Nested FieldStore/ArrayRef assignment expressions in INSERT/UPDATE; + * * Nested FieldStore/SubscriptingRef assignment expressions in INSERT/UPDATE; * see transformAssignmentIndirection(). * * The uses in CaseExpr and ArrayCoerceExpr are safe only to the extent that @@ -952,7 +952,7 @@ typedef struct CaseWhen * break it. * * The nested-assignment-expression case is safe because the only node types - * that can be above such CaseTestExprs are FieldStore and ArrayRef. + * that can be above such CaseTestExprs are FieldStore and SubscriptingRef. */ typedef struct CaseTestExpr { diff --git a/src/tools/pgindent/typedefs.list b/src/tools/pgindent/typedefs.list index c6050a3f77..813f20a7f5 100644 --- a/src/tools/pgindent/typedefs.list +++ b/src/tools/pgindent/typedefs.list @@ -127,8 +127,6 @@ ArrayIterator ArrayMapState ArrayMetaState ArrayParseState -ArrayRef -ArrayRefState ArrayType AsyncQueueControl AsyncQueueEntry @@ -2276,6 +2274,8 @@ SubXactEvent SubqueryScan SubqueryScanPath SubqueryScanState +SubscriptingRef +SubscriptingRefState Subscription SubscriptionInfo SubscriptionRelState
diff --git a/src/backend/commands/tablecmds.c b/src/backend/commands/tablecmds.c index bfcf9472d7..6fe35c4cd1 100644 --- a/src/backend/commands/tablecmds.c +++ b/src/backend/commands/tablecmds.c @@ -5509,8 +5509,8 @@ ATPrepAddColumn(List **wqueue, Relation rel, bool recurse, bool recursing, } /* - * Add a column to a table; this handles the AT_AddOids cases as well. The - * return value is the address of the new column in the parent relation. + * Add a column to a table. The return value is the address of + * the new column in the parent relation. */ static ObjectAddress ATExecAddColumn(List **wqueue, AlteredTableInfo *tab, Relation rel,
diff --git a/src/include/utils/inval.h b/src/include/utils/inval.h index c557640479..6bd6a1b8e8 100644 --- a/src/include/utils/inval.h +++ b/src/include/utils/inval.h @@ -29,8 +29,6 @@ extern void AtEOXact_Inval(bool isCommit); extern void AtEOSubXact_Inval(bool isCommit); -extern void AtPrepare_Inval(void); - extern void PostPrepare_Inval(void); extern void CommandEndInvalidationMessages(void);
diff --git a/src/bin/pg_dump/common.c b/src/bin/pg_dump/common.c index b402e49896..24c4e53f36 100644 --- a/src/bin/pg_dump/common.c +++ b/src/bin/pg_dump/common.c @@ -327,7 +327,7 @@ flagInhTables(Archive *fout, TableInfo *tblinfo, int numTables, /* * flagInhIndexes - - * Create AttachIndexInfo objects for partitioned indexes, and add + * Create IndexAttachInfo objects for partitioned indexes, and add * appropriate dependency links. */ static void
diff --git a/src/include/funcapi.h b/src/include/funcapi.h index 3fc981b96d..03ac46f900 100644 --- a/src/include/funcapi.h +++ b/src/include/funcapi.h @@ -252,7 +252,7 @@ extern Datum HeapTupleHeaderGetDatum(HeapTupleHeader tuple); * oldcontext = MemoryContextSwitchTo(funcctx->multi_call_memory_ctx); * <user defined code> * <if returning composite> - * <build TupleDesc, and perhaps AttInMetaData> + * <build TupleDesc, and perhaps AttInMetadata> * <endif returning composite> * <user defined code> * // return to original context when allocating transient memory
diff --git a/src/include/access/attnum.h b/src/include/access/attnum.h index f16441a587..093eee86c6 100644 --- a/src/include/access/attnum.h +++ b/src/include/access/attnum.h @@ -55,7 +55,7 @@ typedef int16 AttrNumber; ) /* - * AttributeOffsetGetAttributeNumber + * AttrOffsetGetAttrNumber * Returns the attribute number for an attribute offset. */ #define AttrOffsetGetAttrNumber(attributeOffset) \
diff --git a/src/interfaces/libpq/fe-auth.c b/src/interfaces/libpq/fe-auth.c index bb04e27e2f..a45a764ccd 100644 --- a/src/interfaces/libpq/fe-auth.c +++ b/src/interfaces/libpq/fe-auth.c @@ -897,7 +897,7 @@ pg_fe_sendauth(AuthRequest areq, int payloadlen, PGconn *conn) /* * No SSPI support. However, if we have GSSAPI but not SSPI * support, AUTH_REQ_SSPI will have been handled in the codepath - * for AUTH_REQ_GSSAPI above, so don't duplicate the case label in + * for AUTH_REQ_GSS above, so don't duplicate the case label in * that case. */ #if !defined(ENABLE_GSS)
diff --git a/src/backend/libpq/hba.c b/src/backend/libpq/hba.c index 37d5ad44a5..b587a27ec2 100644 --- a/src/backend/libpq/hba.c +++ b/src/backend/libpq/hba.c @@ -1429,7 +1429,7 @@ parse_hba_line(TokenizedLine *tok_line, int elevel) errmsg("GSSAPI encryption only supports gss, trust, or reject authentication"), errcontext("line %d of configuration file \"%s\"", line_num, HbaFileName))); - *err_msg = "GSSAPI encryption only supports gss, trust, or reject authenticaion"; + *err_msg = "GSSAPI encryption only supports gss, trust, or reject authentication"; return NULL; }
diff --git a/src/include/port/pg_bitutils.h b/src/include/port/pg_bitutils.h index fe7c3d0ffc..5197926696 100644 --- a/src/include/port/pg_bitutils.h +++ b/src/include/port/pg_bitutils.h @@ -67,7 +67,7 @@ pg_leftmost_one_pos64(uint64 word) shift -= 8; return shift + pg_leftmost_one_pos[(word >> shift) & 255]; -#endif /* HAVE__BUIILTIN_CLZ */ +#endif /* HAVE__BUILTIN_CLZ */ } /*
diff --git a/src/port/pg_bitutils.c b/src/port/pg_bitutils.c index d12765b33f..c829e7a356 100644 --- a/src/port/pg_bitutils.c +++ b/src/port/pg_bitutils.c @@ -28,7 +28,7 @@ * left-most the 7th bit. The 0th entry of the array should not be used. * * Note: this is not used by the functions in pg_bitutils.h when - * HAVE_BUILTIN_CLZ is defined, but we provide it anyway, so that + * HAVE__BUILTIN_CLZ is defined, but we provide it anyway, so that * extensions possibly compiled with a different compiler can use it. */ const uint8 pg_leftmost_one_pos[256] = {
diff --git a/src/port/pg_bitutils.c b/src/port/pg_bitutils.c index d12765b33f..e6793a65f9 100644 --- a/src/port/pg_bitutils.c +++ b/src/port/pg_bitutils.c @@ -56,7 +56,7 @@ const uint8 pg_leftmost_one_pos[256] = { * left-most the 7th bit. The 0th entry of the array should not be used. * * Note: this is not used by the functions in pg_bitutils.h when - * HAVE_BUILTIN_CTZ is defined, but we provide it anyway, so that + * HAVE__BUILTIN_CLZ is defined, but we provide it anyway, so that * extensions possibly compiled with a different compiler can use it. */ const uint8 pg_rightmost_one_pos[256] = {
diff --git a/src/include/pg_config.h.win32 b/src/include/pg_config.h.win32 index dfd6972383..1c45d04d22 100644 --- a/src/include/pg_config.h.win32 +++ b/src/include/pg_config.h.win32 @@ -159,9 +159,6 @@ /* Define to 1 if you have the <editline/readline.h> header file. */ /* #undef HAVE_EDITLINE_READLINE_H */ -/* Define to 1 if you have the `fcvt' function. */ -#define HAVE_FCVT 1 - /* Define to 1 if you have the `fdatasync' function. */ /* #undef HAVE_FDATASYNC */
diff --git a/src/include/pg_config.h.win32 b/src/include/pg_config.h.win32 index dfd6972383..6cfebd52d9 100644 --- a/src/include/pg_config.h.win32 +++ b/src/include/pg_config.h.win32 @@ -165,9 +165,6 @@ /* Define to 1 if you have the `fdatasync' function. */ /* #undef HAVE_FDATASYNC */ -/* Define to 1 if you have finite(). */ -#define HAVE_FINITE 1 - /* Define to 1 if you have the `fpclass' function. */ /* #undef HAVE_FPCLASS */
diff --git a/src/include/pg_config.h.in b/src/include/pg_config.h.in index 6cd4cfed0a..512213aa32 100644 --- a/src/include/pg_config.h.in +++ b/src/include/pg_config.h.in @@ -464,9 +464,6 @@ /* Define to 1 if you have the `random' function. */ #undef HAVE_RANDOM -/* Define to 1 if you have the `RAND_OpenSSL' function. */ -#undef HAVE_RAND_OPENSSL - /* Define to 1 if you have the <readline.h> header file. */ #undef HAVE_READLINE_H
diff --git a/src/include/pg_config.h.win32 b/src/include/pg_config.h.win32 index dfd6972383..0fb8aaedd4 100644 --- a/src/include/pg_config.h.win32 +++ b/src/include/pg_config.h.win32 @@ -469,9 +469,6 @@ /* Define to 1 if `__ss_len' is member of `struct sockaddr_storage'. */ /* #undef HAVE_STRUCT_SOCKADDR_STORAGE___SS_LEN */ -/* Define to 1 if the system has the type `struct sockaddr_un'. */ -/* #undef HAVE_STRUCT_SOCKADDR_UN */ - /* Define to 1 if `tm_zone' is member of `struct tm'. */ /* #undef HAVE_STRUCT_TM_TM_ZONE */
diff --git a/src/include/pg_config.h.win32 b/src/include/pg_config.h.win32 index dfd6972383..ee0009a59f 100644 --- a/src/include/pg_config.h.win32 +++ b/src/include/pg_config.h.win32 @@ -481,9 +481,6 @@ /* Define to 1 if you have the `sync_file_range' function. */ /* #undef HAVE_SYNC_FILE_RANGE */ -/* Define to 1 if you have the `sysconf' function. */ -/* #undef HAVE_SYSCONF */ - /* Define to 1 if you have the syslog interface. */ /* #undef HAVE_SYSLOG */
diff --git a/contrib/pgcrypto/pgp-compress.c b/contrib/pgcrypto/pgp-compress.c index eaeb221877..2adaf2c875 100644 --- a/contrib/pgcrypto/pgp-compress.c +++ b/contrib/pgcrypto/pgp-compress.c @@ -311,7 +311,7 @@ pgp_decompress_filter(PullFilter **res, PGP_Context *ctx, PullFilter *src) { return pullf_create(res, &decompress_filter, ctx, src); } -#else /* !HAVE_ZLIB */ +#else /* !HAVE_LIBZ */ int pgp_compress_filter(PushFilter **res, PGP_Context *ctx, PushFilter *dst)