From: ilmari@ilmari.org
To: Thomas Munro <thomas.munro@gmail.com>
Cc: Magnus Hagander <magnus@hagander.net>
Cc: Andres Freund <andres@anarazel.de>
Cc: PostgreSQL-development <pgsql-hackers@postgresql.org>
Subject: Re: language cleanups in code and docs
Date: Tue, 05 Jan 2021 00:44:13 +0000
Message-ID: <87turw6wma.fsf@wibble.ilmari.org> (raw)
In-Reply-To: <CA+hUKGLW8vj030DN-GBR-Ou04WkygnHp+tx7hpBgrgZVWKrPzg@mail.gmail.com>
References: <20200615182235.x7lch5n6kcjq4aue@alap3.anarazel.de>
<CABUevEy0vPwsuQ8K_=xLW6=4hFoVCvdxtDpr14FXW55i=8CZYw@mail.gmail.com>
<87wnws6y2w.fsf@wibble.ilmari.org>
<CA+hUKGLW8vj030DN-GBR-Ou04WkygnHp+tx7hpBgrgZVWKrPzg@mail.gmail.com>
Thomas Munro <thomas.munro@gmail.com> writes:
> On Tue, Jan 5, 2021 at 1:12 PM Dagfinn Ilmari Mannsåker
> <ilmari@ilmari.org> wrote:
>> Magnus Hagander <magnus@hagander.net> writes:
>> > In looking at this I realize we also have exactly one thing referred to as
>> > "blacklist" in our codebase, which is the "enum blacklist" (and then a
>> > small internal variable in pgindent).
>>
>> Here's a patch that renames the @whitelist and %blacklist variables in
>> pgindent to @additional and %excluded, and adjusts the comments to
>> match.
>
> Pushed. Thanks!
Thanks! Just after sending that, I thought to grep for "white\W*list"
as well, and found a few more occurrences that were trivially reworded,
per the attached patch.
- ilmari
--
"A disappointingly low fraction of the human race is,
at any given time, on fire." - Stig Sandbeck Mathisen
Attachments:0001-Replace-remaining-uses-of-whitelist.patch (text/x-diff, 4.9K) download
From 43e9c60bac7b1702e5be2362a439f67adc8a5e06 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Dagfinn=20Ilmari=20Manns=C3=A5ker?= <ilmari@ilmari.org>
Date: Tue, 5 Jan 2021 00:20:49 +0000
Subject: [PATCH] Replace remaining uses of "whitelist"
Instead describe the action that the list effects, or just use "list"
where the meaning is obvious from context.
---
contrib/postgres_fdw/postgres_fdw.h | 2 +-
contrib/postgres_fdw/shippable.c | 4 ++--
src/backend/access/hash/hashvalidate.c | 2 +-
src/backend/utils/adt/lockfuncs.c | 2 +-
src/tools/pginclude/README | 4 ++--
5 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/contrib/postgres_fdw/postgres_fdw.h b/contrib/postgres_fdw/postgres_fdw.hindex 277a30f500..19ea27a1bc 100644--- a/contrib/postgres_fdw/postgres_fdw.h+++ b/contrib/postgres_fdw/postgres_fdw.h@@ -77,7 +77,7 @@ typedef struct PgFdwRelationInfo
bool use_remote_estimate;
Cost fdw_startup_cost;
Cost fdw_tuple_cost;
- List *shippable_extensions; /* OIDs of whitelisted extensions */+ List *shippable_extensions; /* OIDs of shippable extensions */
/* Cached catalog information. */
ForeignTable *table;
diff --git a/contrib/postgres_fdw/shippable.c b/contrib/postgres_fdw/shippable.cindex c43e7e5ec5..b27f82e015 100644--- a/contrib/postgres_fdw/shippable.c+++ b/contrib/postgres_fdw/shippable.c@@ -7,7 +7,7 @@
* data types are shippable to a remote server for execution --- that is,
* do they exist and have the same behavior remotely as they do locally?
* Built-in objects are generally considered shippable. Other objects can
- * be shipped if they are white-listed by the user.+ * be shipped if they are declared as such by the user.
*
* Note: there are additional filter rules that prevent shipping mutable
* functions or functions using nonportable collations. Those considerations
@@ -110,7 +110,7 @@ InitializeShippableCache(void)
*
* Right now "shippability" is exclusively a function of whether the object
* belongs to an extension declared by the user. In the future we could
- * additionally have a whitelist of functions/operators declared one at a time.+ * additionally have a list of functions/operators declared one at a time.
*/
static bool
lookup_shippable(Oid objectId, Oid classId, PgFdwRelationInfo *fpinfo)
diff --git a/src/backend/access/hash/hashvalidate.c b/src/backend/access/hash/hashvalidate.cindex 8462540017..1e343df0af 100644--- a/src/backend/access/hash/hashvalidate.c+++ b/src/backend/access/hash/hashvalidate.c@@ -312,7 +312,7 @@ check_hash_func_signature(Oid funcid, int16 amprocnum, Oid argtype)
* that are different from but physically compatible with the opclass
* datatype. In some of these cases, even a "binary coercible" check
* fails because there's no relevant cast. For the moment, fix it by
- * having a whitelist of allowed cases. Test the specific function+ * having a list of allowed cases. Test the specific function
* identity, not just its input type, because hashvarlena() takes
* INTERNAL and allowing any such function seems too scary.
*/
diff --git a/src/backend/utils/adt/lockfuncs.c b/src/backend/utils/adt/lockfuncs.cindex 9f2c4946c9..0db8be6c91 100644--- a/src/backend/utils/adt/lockfuncs.c+++ b/src/backend/utils/adt/lockfuncs.c@@ -644,7 +644,7 @@ pg_isolation_test_session_is_blocked(PG_FUNCTION_ARGS)
/*
* Check if blocked_pid is waiting for a safe snapshot. We could in
* theory check the resulting array of blocker PIDs against the
- * interesting PIDs whitelist, but since there is no danger of autovacuum+ * interesting PIDs list, but since there is no danger of autovacuum
* blocking GetSafeSnapshot there seems to be no point in expending cycles
* on allocating a buffer and searching for overlap; so it's presently
* sufficient for the isolation tester's purposes to use a single element
diff --git a/src/tools/pginclude/README b/src/tools/pginclude/READMEindex a067c7f472..49eb4b6907 100644--- a/src/tools/pginclude/README+++ b/src/tools/pginclude/README@@ -64,7 +64,7 @@ with no prerequisite headers other than postgres.h (or postgres_fe.h
or c.h, as appropriate).
A small number of header files are exempted from this requirement,
-and are whitelisted in the headerscheck script.+and are skipped by the headerscheck script.
The easy way to run the script is to say "make -s headerscheck" in
the top-level build directory after completing a build. You should
@@ -86,7 +86,7 @@ the project's coding language is C, some people write extensions in C++,
so it's helpful for include files to be C++-clean.
A small number of header files are exempted from this requirement,
-and are whitelisted in the cpluspluscheck script.+and are skipped by the cpluspluscheck script.
The easy way to run the script is to say "make -s cpluspluscheck" in
the top-level build directory after completing a build. You should
--
2.29.2
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-hackers@postgresql.org
Cc: ilmari@ilmari.org, thomas.munro@gmail.com, magnus@hagander.net, andres@anarazel.de
Subject: Re: language cleanups in code and docs
In-Reply-To: <87turw6wma.fsf@wibble.ilmari.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox