pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bruce Momjian <bruce@momjian.us>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add macro RelationIsPermanent() to report relation permanence
Date: Tue, 23 Mar 2021 00:33:32 +0000
Message-ID: <E1lOUzE-0008Aq-Mp@gemulon.postgresql.org> (raw)

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(-)



Message-ID: <E1lOUzE-0008Aq-Mp@gemulon.postgresql.org>
Permalink:  ../E1lOUzE-0008Aq-Mp@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1lOUzE-0008Aq-Mp@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: bruce@momjian.us
  Subject: Re: pgsql: Add macro RelationIsPermanent() to report relation permanence
  In-Reply-To: <E1lOUzE-0008Aq-Mp@gemulon.postgresql.org>
  References: <E1lOUzE-0008Aq-Mp@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox