aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2022-07-11 11:07:33 +0900
committerMichael Paquier <michael@paquier.xyz>2022-07-11 11:07:33 +0900
commit8445f5a21d40b969673ca03918c74b4fbc882bf4 (patch)
tree77740972b2b7477a613c9955c008f20da26c26d4
parent1cd182163061f0c8619eaf79dc077ef78a81a13b (diff)
downloadpostgresql-8445f5a21d40b969673ca03918c74b4fbc882bf4.tar.gz
postgresql-8445f5a21d40b969673ca03918c74b4fbc882bf4.zip
Improve two comments related to a boolean DefElem's value
The original comments mentioned a "parameter" as something not defined in a fast-exit path to assume a true status. This is rather confusing as the parameter DefElem is defined, and the intention is to check if its value is defined. This improves both comments to mention the value assigned to the DefElem's value instead, so as future patches are able to catch the tweak if this code pattern gets copied around more. Author: Peter Smith Discussion: https://postgr.es/m/CAHut+Pv0yWynWTmp4o34s0d98xVubys9fy=p0YXsZ5_sUcNnMw@mail.gmail.com
-rw-r--r--src/backend/commands/copy.c2
-rw-r--r--src/backend/commands/define.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/backend/commands/copy.c b/src/backend/commands/copy.c
index e2870e3c11c..3ac731803bd 100644
--- a/src/backend/commands/copy.c
+++ b/src/backend/commands/copy.c
@@ -321,7 +321,7 @@ static CopyHeaderChoice
defGetCopyHeaderChoice(DefElem *def, bool is_from)
{
/*
- * If no parameter given, assume "true" is meant.
+ * If no parameter value given, assume "true" is meant.
*/
if (def->arg == NULL)
return COPY_HEADER_TRUE;
diff --git a/src/backend/commands/define.c b/src/backend/commands/define.c
index 0755ab1eae5..86b89071eed 100644
--- a/src/backend/commands/define.c
+++ b/src/backend/commands/define.c
@@ -108,7 +108,7 @@ bool
defGetBoolean(DefElem *def)
{
/*
- * If no parameter given, assume "true" is meant.
+ * If no parameter value given, assume "true" is meant.
*/
if (def->arg == NULL)
return true;