Skip to content

Commit 221b377

Browse files
committed
Improve comment for att_isnull.
The comment implies that a 1 in the null bitmap indicates a null value, but actually a 0 in the null bitmap indicates a null value. Try to be more clear. Patch by me; proposed wording reviewed by Alvaro Herrera and Tom Lane. Discussion: http://postgr.es/m/CA+TgmobHOP8r6cG+UnsDFMrS30-m=jRrCBhgw-nFkn0k9QnFsg@mail.gmail.com
1 parent ddf927f commit 221b377

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/include/access/tupmacs.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,9 @@
1616

1717

1818
/*
19-
* check to see if the ATT'th bit of an array of 8-bit bytes is set.
19+
* Check a tuple's null bitmap to determine whether the attribute is null.
20+
* Note that a 0 in the null bitmap indicates a null, while 1 indicates
21+
* non-null.
2022
*/
2123
#define att_isnull(ATT, BITS) (!((BITS)[(ATT) >> 3] & (1 << ((ATT) & 0x07))))
2224

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy