Add macro RelationIsPermanent() to report relation permanence
Bruce Momjian <bruce@momjian.us>
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
| Path | Change | +/− |
|---|---|---|
| src/backend/access/gist/gistutil.c | modified | +1 −1 |
| src/backend/access/heap/heapam_handler.c | modified | +1 −1 |
| src/backend/catalog/pg_publication.c | modified | +1 −1 |
| src/backend/commands/tablecmds.c | modified | +5 −5 |
| src/backend/optimizer/util/plancat.c | modified | +1 −2 |
| src/backend/utils/cache/relcache.c | modified | +1 −1 |
| src/include/utils/rel.h | modified | +8 −2 |
| src/include/utils/snapmgr.h | modified | +1 −2 |
Discussion
- Key management with tests 464 messages · 2021-01-01 → 2022-06-16