Re: A minor correction in comment in heaptuple.c - Mailing list pgsql-hackers

From D'Arcy J.M. Cain
Subject Re: A minor correction in comment in heaptuple.c
Date
Msg-id 20130618133800.19976c43@imp
Whole thread Raw
In response to Re: A minor correction in comment in heaptuple.c  (Andres Freund <andres@2ndquadrant.com>)
Responses Re: A minor correction in comment in heaptuple.c
List pgsql-hackers
On Tue, 18 Jun 2013 19:19:40 +0200
Andres Freund <andres@2ndquadrant.com> wrote:
> The NULL refers to the *meaning* of the function (remember, it's
> called slot_attisnull) . Which is to test whether an attribute is
> null. Not to a C NULL.

Actually, the comment is not for the function.  It only describes the
two lines that follow.  In C the string "NULL" is commonly a reference
to C's NULL value.  Anyone reading C code can be excused for assuming
that if it isn't otherwise clear.  How about "Indicate that the
attribute is NULL if out of range..."?

Although, the more I think about it, the more I think that the comment
is both confusing and superfluous.  The code itself is much clearer.

-- 
D'Arcy J.M. Cain <darcy@druid.net>         |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 788 2246     (DoD#0082)    (eNTP)   |  what's for dinner.
IM: darcy@Vex.Net, VOIP: sip:darcy@Vex.Net



pgsql-hackers by date:

Previous
From: Josh Berkus
Date:
Subject: Re: ASYNC Privileges proposal
Next
From: Simon Riggs
Date:
Subject: Re: SET work_mem = '1TB';