bugfifx: a minor mistake in brin_inclusion.c comment

Started by Tomas Vondraalmost 8 years ago2 messages
#1Tomas Vondra
tomas.vondra@2ndquadrant.com
1 attachment(s)

Hi,

while looking at brin_inclusion.c, I've noticed that the comment about
INCLUSION_UNMERGEABLE and INCLUSION_CONTAINS_EMPTY uses incorrect values
(1 instead of 2). Attached is a simple fix.

But perhaps it would be better to use the constants in the comment.

regards

--
Tomas Vondra http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

Attachments:

brin-inclusion-doc-fix.patchtext/x-patch; name=brin-inclusion-doc-fix.patchDownload
diff --git a/src/backend/access/brin/brin_inclusion.c b/src/backend/access/brin/brin_inclusion.c
index 2542877..d8042b0 100644
--- a/src/backend/access/brin/brin_inclusion.c
+++ b/src/backend/access/brin/brin_inclusion.c
@@ -60,9 +60,9 @@
  * The values stored in the bv_values arrays correspond to:
  *
  * 0 - the union of the values in the block range
- * 1 - whether an empty value is present in any tuple in the block range
- * 2 - whether the values in the block range cannot be merged (e.g. an IPv6
+ * 1 - whether the values in the block range cannot be merged (e.g. an IPv6
  *	   address amidst IPv4 addresses).
+ * 2 - whether an empty value is present in any tuple in the block range
  */
 #define INCLUSION_UNION				0
 #define INCLUSION_UNMERGEABLE		1
#2Alvaro Herrera
alvherre@alvh.no-ip.org
In reply to: Tomas Vondra (#1)
Re: bugfifx: a minor mistake in brin_inclusion.c comment

Tomas Vondra wrote:

Hi,

while looking at brin_inclusion.c, I've noticed that the comment about
INCLUSION_UNMERGEABLE and INCLUSION_CONTAINS_EMPTY uses incorrect values
(1 instead of 2). Attached is a simple fix.

Uh, yeah, this is wrong.

But perhaps it would be better to use the constants in the comment.

I fixed it like this, which seems neater.

Thanks!

--
�lvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services