Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ezAdo-00005B-UB for pgsql-hackers@arkaria.postgresql.org; Fri, 23 Mar 2018 00:33:09 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ezAdn-0005SE-JX for pgsql-hackers@arkaria.postgresql.org; Fri, 23 Mar 2018 00:33:07 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1ezAdn-0005S3-C7 for pgsql-hackers@lists.postgresql.org; Fri, 23 Mar 2018 00:33:07 +0000 Received: from mail-wm0-x235.google.com ([2a00:1450:400c:c09::235]) by magus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ezAdi-0006na-J4 for pgsql-hackers@postgresql.org; Fri, 23 Mar 2018 00:33:06 +0000 Received: by mail-wm0-x235.google.com with SMTP id h76so672426wme.4 for ; Thu, 22 Mar 2018 17:33:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=to:from:subject:message-id:date:user-agent:mime-version :content-language; bh=YJBYrO3ScJKyloeDGsoyxCUQjq5rqCoaJR/e7EwdVZ0=; b=dwKvJEIjB9jPDY4ZXDAYotd2dZaB3qiuftGEzostxjwE6XG/ra0JvzY4F16HbwwtAE Gyk0TdUDcwJVHOurJZ9RvnjoxD3IrGTZGVfBsW3p7erlddLC7k4luAL3+/DznrlHOEio Yr9SjcF6RpMHEV2/3cwD5LgK6JYzSfvCigkezUxXqn2IfL+2Q5H3suErKGKSga6H4icg 2AmGoltF6vyPvpqtSZpGAlgY8+5jRmtTC2fPfpTZmnYcpcdDDeXlempz6I8UAqqiZY60 fRGCIQc+hRzYKEU5yw1vilUyg9J95Z0JlsU7liE5yZJVnKovntNxRAQ+IjyvTPStsda7 mX4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:message-id:date:user-agent :mime-version:content-language; bh=YJBYrO3ScJKyloeDGsoyxCUQjq5rqCoaJR/e7EwdVZ0=; b=V6okocNPdRKdFQSsh+tk+OR0DYvdpp+4J3fsD4FtH+DIZPKtoWpXDA7HsnnzVSeN86 80MXgQ56qZq05N9g6jX4RDJTV1eBDgegKY0SwbkdjK+w49CHdl8XdojeibhyvZW/2elH ZKtiqkSLEKCtWZC2shVPGulThiIisp25HE623iyAsW6deQQO5QldHh5A5FID6CsaWMik bqD/3hVUjp4Blaz4u+y+SvIFMDJI4dfTqTHsxiRaJjLb27iNx8H3lSiW+8AQ84oHtj9I /Cl58IPn44bmJZbtUitwztiaybOQNUeH9Df0OU44yWOzK8rdCI/6Z9hiSU4M2rCMOmGF m8jg== X-Gm-Message-State: AElRT7Ec5fE0vbFZRcI3m+nWnTabw/mDi1PqBoyH1+xEDGZsOytjzF4A NNg6baSbIpQIzZvTwYPCm2F5Z1rEdwKzoRWNvqKz08w+DHliDj+wPW2dWhV9LnfGN3OHVJscuIM ihPBylEkcdImZHl/d6RKHJzYQCHzcVZdKyyD2pJwbR5F8PrWZuRAhli0z4jvYBs7wCtU0x1Lf8i eVcx2SvZfWM/o= X-Google-Smtp-Source: AG47ELuFFcnf0rtQGc4/932ej6Xzttz9c56QeZHTFcpKc9xf+JixE/HSHDpONqBLyhI+xsXBMSXPIw== X-Received: by 10.28.105.135 with SMTP id z7mr6946324wmh.119.1521765179579; Thu, 22 Mar 2018 17:32:59 -0700 (PDT) Received: from [10.137.2.17] (ip-78-102-97-226.net.upcbroadband.cz. [78.102.97.226]) by smtp.gmail.com with ESMTPSA id q90sm3635509wrb.6.2018.03.22.17.32.58 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Mar 2018 17:32:58 -0700 (PDT) To: Postgres hackers From: Tomas Vondra Subject: bugfifx: a minor mistake in brin_inclusion.c comment Message-ID: <5ff514f2-8b1e-6366-b11c-8e2ed442562d@2ndquadrant.com> Date: Fri, 23 Mar 2018 01:32:55 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------DE2017399FFB9E3976DA035D" Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------DE2017399FFB9E3976DA035D Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit 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 --------------DE2017399FFB9E3976DA035D Content-Type: text/x-patch; name="brin-inclusion-doc-fix.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="brin-inclusion-doc-fix.patch" 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 --------------DE2017399FFB9E3976DA035D--