From: | Bruce Momjian <bruce(at)momjian(dot)us> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Add macro RelationIsPermanent() to report relation permanence |
Date: | 2021-03-23 00:33:32 |
Message-ID: | E1lOUzE-0008Aq-Mp@gemulon.postgresql.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Add macro RelationIsPermanent() to report relation permanence
Previously, to check relation permanence, the Relation's Form_pg_class
structure member relpersistence was compared to the value
RELPERSISTENCE_PERMANENT ("p"). This commit adds the macro
RelationIsPermanent() and is used in appropirate places to simplify the
code. This matches other RelationIs* macros.
This macro will be used in more places in future cluster file encryption
patches.
Discussion: https://postgr.es/m/20210318153134.GH20766@tamriel.snowman.net
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/95d77149c53545a74e0c84717cf8f925b8f6d632
Modified Files
--------------
src/backend/access/gist/gistutil.c | 2 +-
src/backend/access/heap/heapam_handler.c | 2 +-
src/backend/catalog/pg_publication.c | 2 +-
src/backend/commands/tablecmds.c | 10 +++++-----
src/backend/optimizer/util/plancat.c | 3 +--
src/backend/utils/cache/relcache.c | 2 +-
src/include/utils/rel.h | 10 ++++++++--
src/include/utils/snapmgr.h | 3 +--
8 files changed, 19 insertions(+), 15 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | Fujii Masao | 2021-03-23 00:56:18 | pgsql: pg_waldump: Fix bug in per-record statistics. |
Previous Message | Tomas Vondra | 2021-03-22 23:55:22 | pgsql: Move IS [NOT] NULL handling from BRIN support functions |