Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 8445f5a

Browse files
committed
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
1 parent 1cd1821 commit 8445f5a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/backend/commands/copy.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -321,7 +321,7 @@ static CopyHeaderChoice
321321
defGetCopyHeaderChoice(DefElem *def, bool is_from)
322322
{
323323
/*
324-
* If no parameter given, assume "true" is meant.
324+
* If no parameter value given, assume "true" is meant.
325325
*/
326326
if (def->arg == NULL)
327327
return COPY_HEADER_TRUE;

src/backend/commands/define.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ bool
108108
defGetBoolean(DefElem *def)
109109
{
110110
/*
111-
* If no parameter given, assume "true" is meant.
111+
* If no parameter value given, assume "true" is meant.
112112
*/
113113
if (def->arg == NULL)
114114
return true;

0 commit comments

Comments
 (0)