Add macro RelationIsPermanent() to report relation permanence

Bruce Momjian <bruce@momjian.us>

Commit: 95d77149c53545a74e0c84717cf8f925b8f6d632
Author: Bruce Momjian <bruce@momjian.us>
Date: 2021-03-23T00:23:52Z
Releases: 14.0
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

Files

Discussion