pgsql: Move IS [NOT] NULL handling from BRIN support functions

From: Tomas Vondra <tomas(dot)vondra(at)postgresql(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Move IS [NOT] NULL handling from BRIN support functions
Date: 2021-03-22 23:55:22
Message-ID: E1lOUOI-0007wK-58@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Move IS [NOT] NULL handling from BRIN support functions

The handling of IS [NOT] NULL clauses is independent of an opclass, and
most of the code was exactly the same in both minmax and inclusion. So
instead move the code from support procedures to the AM.

This simplifies the code - especially the support procedures - quite a
bit, as they don't need to care about NULL values and flags at all. It
also means the IS [NOT] NULL clauses can be evaluated without invoking
the support procedure.

Author: Tomas Vondra <tomas(dot)vondra(at)postgresql(dot)org>
Author: Nikita Glukhov <n(dot)gluhov(at)postgrespro(dot)ru>
Reviewed-by: Nikita Glukhov <n(dot)gluhov(at)postgrespro(dot)ru>
Reviewed-by: Mark Dilger <hornschnorter(at)gmail(dot)com>
Reviewed-by: Alexander Korotkov <aekorotkov(at)gmail(dot)com>
Reviewed-by: Masahiko Sawada <masahiko(dot)sawada(at)enterprisedb(dot)com>
Reviewed-by: John Naylor <john(dot)naylor(at)enterprisedb(dot)com>
Discussion: https://postgr.es/m/c1138ead-7668-f0e1-0638-c3be3237e812@2ndquadrant.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/72ccf55cb99c6450dfb77f2f8f4a28b5c049ef7a

Modified Files
--------------
src/backend/access/brin/brin.c | 293 ++++++++++++++++++++++++-------
src/backend/access/brin/brin_inclusion.c | 96 +---------
src/backend/access/brin/brin_minmax.c | 93 +---------
src/include/access/brin_internal.h | 3 +
4 files changed, 244 insertions(+), 241 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Bruce Momjian 2021-03-23 00:33:32 pgsql: Add macro RelationIsPermanent() to report relation permanence
Previous Message Tom Lane 2021-03-22 18:01:31 pgsql: Mostly-cosmetic adjustments of TOAST-related macros.