Some RELKIND macro refactoring

From: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
To: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Some RELKIND macro refactoring
Date: 2021-08-16 13:20:07
Message-ID: a574c8f1-9c84-93ad-a9e5-65233d6fc00f@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Attached patches introduce more macros to group some RELKIND_* macros:

- RELKIND_HAS_PARTITIONS()
- RELKIND_HAS_TABLESPACE()
- RELKIND_HAS_TABLE_AM()
- RELKIND_HAS_INDEX_AM()

I collected those mainly while working on the relkind error messages
patch [0]. I think they improve the self-documentation of the code in
many places that are currently just random collections or endless
streams of RELKIND macros.

Some may recall the previous thread [1] that made a similar proposal.
The result here was that those macros were too thinly sliced and not
generally useful enough. My proposal is completely separate from that.

[0]:
https://www.postgresql.org/message-id/flat/dc35a398-37d0-75ce-07ea-1dd71d98f8ec(at)2ndquadrant(dot)com
[1]:
https://www.postgresql.org/message-id/flat/CAFjFpRcfzs%2Byst6YBCseD_orEcDNuAr9GUTraZ5GC%3DAvCYh55Q%40mail.gmail.com

Attachment Content-Type Size
v1-0001-pg_dump-Remove-redundant-relkind-checks.patch text/plain 1.8 KB
v1-0002-Some-RELKIND-macro-refactoring.patch text/plain 23.6 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2021-08-16 13:31:18 Re: Added schema level support for publication.
Previous Message Tomas Vondra 2021-08-16 13:19:53 Re: PoC/WIP: Extended statistics on expressions